Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 220613 - Platform UI now provides a collapse all command
Summary: Platform UI now provides a collapse all command
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.4 RC1   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-27 12:29 EST by Paul Webster CLA
Modified: 2008-05-06 15:34 EDT (History)
2 users (show)

See Also:


Attachments
patch (5.05 KB, patch)
2008-05-06 14:18 EDT, Darin Wright CLA
no flags Details | Diff
mylyn/context/zip (1.60 KB, application/octet-stream)
2008-05-06 15:34 EDT, Curtis Windatt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2008-02-27 12:29:57 EST
Platform UI now provides a collapse all command, org.eclipse.ui.navigate.collapseAll, and an implementation of a handler that can be used with org.eclipse.ui.handlers.CollapseAllHandler any AbstractTreeViewer.

Using this command with your action or converting to the new handler would allow you to take advantage of the keybinding as well.

PW
Comment 1 Darin Wright CLA 2008-05-02 12:22:32 EDT
This feels like a good 3.4 polish item.
Comment 2 Darin Wright CLA 2008-05-06 13:21:31 EDT
I just set the action definition id on the IAction, and then the appropriate key binding showed in the hover help. However, pressing the keys had no effect. Is there something else we need to do to hook this up?
Comment 3 Darin Wright CLA 2008-05-06 13:22:19 EDT
Paul, please see question in previous comment.
Comment 4 Paul Webster CLA 2008-05-06 13:36:41 EDT
Darin, if you are going to use your existing action you should also be able to go:

IHandlerService hs = (IHandlerService) getSite().getService(IHandlerService.class)
hs.activatehandler("org.eclipse.ui.navigate.collapseAll",
  new ActionHandler(collapseAllAction));

using org.eclipse.jface.commands.ActionHandler

PW
Comment 5 Darin Wright CLA 2008-05-06 14:18:09 EDT
Created attachment 98903 [details]
patch

Adds collapse all handler for variables, expressions, and breakpoints view.
Comment 6 Darin Wright CLA 2008-05-06 14:18:40 EDT
Please review/apply patch, Curtis.
Comment 7 Curtis Windatt CLA 2008-05-06 15:34:14 EDT
Fixed in HEAD.  Replaced hard coded command id's with constant.
Comment 8 Curtis Windatt CLA 2008-05-06 15:34:18 EDT
Created attachment 98929 [details]
mylyn/context/zip