Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 25826

Summary: [Navigator] Navigator View should have a "Collapse All" button
Product: [Eclipse Project] Platform Reporter: Sebastian Davids <sdavids>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Icon from org.eclipse.jdt.ui
none
Implements the "Collapse All" feature none

Description Sebastian Davids CLA 2002-11-07 09:21:16 EST
The JDT Package Explorer has this nice "Collapse All" button on it's tool bar.

I think the Navigator view would profit from a similar feature.

It is a really convenient way to "unclutter" your Navigator view.

Also, after getting used to using it in the Package Explorer one always wonders
why the Navigator view (which is -- from the users perspective -- a similar
view) doesn't have the same feature.
Comment 1 Sebastian Davids CLA 2002-11-07 09:22:42 EST
Created attachment 2334 [details]
Icon from org.eclipse.jdt.ui

The attached icon is a copy from project org.eclipse.jdt.ui.

It has to be placed into the icons/full/elcl16 folder of the project
org.eclipse.ui.
Comment 2 Sebastian Davids CLA 2002-11-07 09:27:49 EST
Created attachment 2335 [details]
Implements the "Collapse All" feature

@@ CollapseAllAction @@

I copied the method getImageDescriptor(String) from
org.eclipse.ui.views.framelist.FrameAction.

It could be placed as a protected member function into class
ResourceNavigatorAction; so future subclasses would also be able to have an
icon -- I did not do so because I wanted to keep the number of affected classes
down.

I placed the icon's file name and path as string constants directly into the
code -- instead of placing them into a properties file -- because the
subclasses of FrameAction do so too.

@@ MainActionGroup @@

I added the CollapseAllAction directly to MainAction group instead of creating
a CollapseActionGroup because creating a "group" for one action doesn't make
sense in this particular case.
Comment 3 Sonia Dimitrov CLA 2002-11-07 09:41:02 EST

*** This bug has been marked as a duplicate of 14641 ***
Comment 4 Sebastian Davids CLA 2002-11-08 00:33:12 EST
see bug 14641