Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 125654 - Project "expose" would be cool for removing unrelated projects
Summary: Project "expose" would be cool for removing unrelated projects
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.2 M5   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-29 16:14 EST by Gregory Gerard CLA
Modified: 2006-02-13 15:45 EST (History)
5 users (show)

See Also:


Attachments
Proposed implementation (20.55 KB, patch)
2006-01-30 15:10 EST, John Arthorne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gregory Gerard CLA 2006-01-29 16:14:39 EST
I know about Mylar and it's coolness...
I don't think this should be under the Resources component but I couldn't find a "Project" component (JDT seemed too specific for the RFE I'm about to suggest).

In addition to "Close Project", I'd like "Close Unrelated Projects" or "Hide Unrelated Projects". This would close all projects not referenced by the current project or any project that doesn't reference the current project.

It'd work just by a quick scan of the workspace project linkages so there's no big  framework or shift to the current navigation. But for a small amount of effort, it'd help cut down the clutter without having to export/import preferences into a new workspace (keeping related projects grouped manually in multiple workspaces cuts down on the clutter but is hideous keeping prefs in synch and third-party plugins that don't transfer licenses in export correctly).

The thought for this occured while using Expose on Mac OS X.
Comment 1 John Arthorne CLA 2006-01-30 12:13:49 EST
Neat idea.  Moving to UI.
Comment 2 John Arthorne CLA 2006-01-30 12:14:10 EST
I'll investigate.
Comment 3 John Arthorne CLA 2006-01-30 15:10:05 EST
Created attachment 33813 [details]
Proposed implementation
Comment 4 John Arthorne CLA 2006-01-30 16:29:08 EST
I have released this so I can get feedback in the next I-build.
Comment 5 Nick Edgar CLA 2006-01-31 16:12:41 EST
How will switching back to one of the closed projects (or project sets) work?
E.g. if I want to reopen a closed project that has a bunch of closed prerequisite or dependent projects?
Comment 6 John Arthorne CLA 2006-01-31 16:54:21 EST
Nick, agreed that an inverse operation makes sense.  The problem is that performing the exact inverse requires opening every project to determine what projects are dependent on the project being opened.  A reasonable compromise is to implement an action that opens a project along with all projects it requires (see bug 113178).  Not the exact inverse, but likely to be useful as well.
Comment 7 Nick Edgar CLA 2006-01-31 17:16:54 EST
Maybe "Open Project" could just prompt for whether to open all prerequisites (but only if there are some closed ones).
Comment 8 Gregory Gerard CLA 2006-01-31 18:01:18 EST
I agree. No exact inverse needs to be implemented (would require storage of state and that gets messy).

A preference would be great (recurse/no-recurse checkbox). I think the normal case for reopen is to recurse through because none of my searches would work unless all the projects are opened in the workspace.

I'll grant that I'm assuming my work pattern to be everyone's work pattern...

Is there a way to detect a modifier key is being applied? Hold down control or shift and the menu text will say "open project plus dependencies"?

A related would be "open all related projects" (scan all projects (even closed ones) and see if they refer to the one in question; keep going until the full graph is opened.)
Comment 9 Dani Megert CLA 2006-02-01 06:28:42 EST
I can find no way to enable the menu. Is it possible that this isn't working for the Package Explorer?
Comment 10 John Arthorne CLA 2006-02-01 09:42:32 EST
I only added the action to the Navigator and to the Project menu.  Martin, something to consider adding to the Package Explorer.
Comment 11 Dani Megert CLA 2006-02-02 06:39:49 EST
>Martin,
>something to consider adding to the Package Explorer.
I've added it to JDT UI (Package Explorer and Java Browsing perspective). 
Available in builds > N20060202-0010.

Now some feedback:
- the enablement is not in sync with 'Close Project' I'd either expect that
  'Close Project' is also available for project children or 'Close Unrelated
  Project' is disabled for those.
- so far you implemented one gusto of "unrelated" which treats projects which
  need the selected project(s) as related. I'd like those be treated as
  unrelated. In my development workspace the current implementation closes 
  almost no project.
- +1 to have something along the lines of bug 113178.
Comment 12 John Arthorne CLA 2006-02-02 10:49:37 EST
I have fixed enablement to be consistent with "Close Project" (only enabled when the selection contains only projects).

On whether projects that require the selected projects should be closed: The initial enhancement request is clear on not wanting to close projects that require the selected projects.  I can see either one being useful.  The current behaviour makes sense for the user that has completely orthogonal groups of projects that are worked on independently.
Comment 13 Dani Megert CLA 2006-02-02 11:03:18 EST
I agree that both make sense, that's why I wrote 'gusto' ;-)
What about a preference (I can live with a configuration setting without UI)?
Comment 14 John Arthorne CLA 2006-02-13 15:45:31 EST
Verified it works in I20060213-0800