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

Bug 225036

Summary: [GlobalActions] Expand All / Collapse All global retargetable actions
Product: [Eclipse Project] Platform Reporter: Mark Finlayson <markaf>
Component: UIAssignee: Prakash Rangaraj <prakash>
Status: VERIFIED FIXED QA Contact: Paul Webster <pwebster>
Severity: enhancement    
Priority: P5 CC: markus.kell.r, prakash
Version: 3.4Keywords: helpwanted
Target Milestone: 3.6 M6   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 29827, 41092    
Attachments:
Description Flags
Patch v01 none

Description Mark Finlayson CLA 2008-03-31 23:44:29 EDT
Summary: The addition of global retargetable commands "Expand All" and "Collapse All", perhaps placed in the Navigation menu. Also the modification of tree-centered views in the IDE and JDT to register a handler for these actions (where appropriate).

Reasons: Many of Eclipse's views are tree-based, and already have their own proprietary expand all/collapse all functionality.  The number of times this is repeated argues for a central dispatch point.

I personally find myself hitting the "collapse all" button a lot in the Navigator and Java Package Viewer, as well as manually Expanding All in the Java Outline or Hierarchy Views.  A single keystroke to perform these tasks would be a great time saver.

Not too long ago I got so frustrated with continually expanding in the Hierarchy view that I made a little plugin in 3.1 that added these commands, and was able to get the Heirarchy view to respond to these handlers.  Unfortunately, I didn't maintain the plugin for later versions, and anyway, it all was a hack because a lot of the methods one needs to call are hidden in internal API, requiring reflection.  A better way to do this would be to integrate it more firmly with the IDE and JDT internals.
Comment 1 Paul Webster CLA 2008-04-01 08:50:16 EDT
In 3.4 we added a collapseAll command and public handler org.eclipse.ui.handlers.CollapseAllHandler ... any part that uses this will collapse all on CTRL+SHIFT+Numpad_Divide.

I would take a similar submission for 3.5 for the expand all command.

PW
Comment 2 Paul Webster CLA 2009-03-02 11:41:38 EST
Updated as per http://wiki.eclipse.org/Platform_UI/Bug_Triage
PW
Comment 3 Susan McCourt CLA 2009-07-14 13:21:19 EDT
*** Bug 283418 has been marked as a duplicate of this bug. ***
Comment 4 Susan McCourt CLA 2009-07-14 13:22:09 EDT
(In reply to comment #1)
> I would take a similar submission for 3.5 for the expand all command.
> 
> PW
> 

from dup bug:
> Suggested default key is
>CTRL+SHIFT+Numpad_Multiply.
Comment 5 Prakash Rangaraj CLA 2009-09-30 13:33:56 EDT
Created attachment 148450 [details]
Patch v01

And for the image we can use the one in the debug.ui plugin?
Comment 6 Paul Webster CLA 2010-02-04 08:29:27 EST
You added a patch ... now you can review it :-)

PW
Comment 7 Prakash Rangaraj CLA 2010-02-10 05:10:50 EST
(In reply to comment #6)
> You added a patch ... now you can review it :-)

   Looks good to me :-)

Released to HEAD
Comment 8 Prakash Rangaraj CLA 2010-03-10 00:28:23 EST
Verified in I20100309-0100