Project: Eclipse_Platform_UI
Bug 225036 [GlobalActions] Expand All / Collapse All global retargetable actions
Reported: 2008-03-31 23:44:29 | Status: verified fixed

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.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ExpandAllHandler.java