Project: Eclipse_Platform_UI
Bug 136830 Close Unrelated Projects closes needed projects
Reported: 2006-04-14 07:50:50 | Status: verified fixed

As I did not find a description in the help about the "Close Unrelated" menu item my guess is, that it would close all projects which are not needed for the selected one - at least this is what would make most sense for me. Under this assumption I file this bug, as in 3.2M6 "Close Unrelated" closes Projects which are needed to build the current project. How to reproduce: I start eclipse with a as unencumbered environment as possible $ mkdir /tmp/freshDirectory $ cd /tmp/freshDirectory $ HOME=/tmp/freshDirectory /usr/local/java/eclipse/eclipse -data /tmp/freshDirectory Then in eclipse enter the Workbench. Create three Java Projects named "A", "B" and "C". Select project "C" and enter Project->Properties. Select "Java Build Path" and there the "Projects" Tab. Add project "A" to the required projects list. Press "OK" to terminate the dialog. Select project "C" press the right mouse button and in the popup menu select "Close Unrelated Projects". Result: Both Projects "A" and "B" are closed. The "Problems" view shows two errors informing that the project "C" cannot be built anymore because project "A" is missed. Expected Result: Only project B, on which A does not depend, is closed. PS: If you had intended to just implement a simple "Close All Others" item like for the editor tabs, which does not care about any dependencies, then you should call it "Close All Other Projects" and not "Close Unrelated Projects". But please, don't use this as a quick fix. Implement something that is really useful.

Files changed in fix:
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/CloseUnrelatedProjectsAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/MainActionGroup.java