|
|
|
Re: reusable collapse all action? [message #506064 is a reply to message #506031] |
Tue, 05 January 2010 23:31 |
Natasha D'Silva Messages: 25 Registered: July 2009 |
Junior Member |
|
|
Actually, I think there is a regression in 3.6, as this does not work. When I register the handler, my view's toolbar loses 3 or so of its actions, they aren't visible until I resize the view, and a text label appears for the collapse all action.
I have tested with the Sample view, and I still get the same problem.
Create a plugin using the Sample view template, and select a Tree viewer when prompted. Modify the view's get part control to add this at the end of the method, and you will see that several of the actions are missing.
IWorkbenchPartSite site = getSite();
if (site != null) {
IHandlerService handlerService = (IHandlerService) site.getService(
IHandlerService.class);
if (handlerService != null) {
fCollapseHandler = new CollapseAllHandler(viewer);
handlerService.activateHandler(CollapseAllHandler.COMMAND_ID, fCollapseHandler, null);
}
}
EDIT:
Here is a screenshot. The picture on the left shows the collapse all action when the handler is not activated, and the middle and right pictures show what the view looks like afterwards.
http://img10.imageshack.us/img10/8449/screenshotqb.png
[Updated on: Tue, 05 January 2010 23:45] Report message to a moderator
|
|
|
|
|
|
|
Re: reusable collapse all action? [message #803398 is a reply to message #505334] |
Tue, 21 February 2012 09:43 |
Sreekanth SC Messages: 14 Registered: January 2011 |
Junior Member |
|
|
Hi Paul,
I see the solution you have given to provide collapse-all/expand-all toolbar button to user defined views. Currently I am working on XText, and I have an editor defined for xtext and an outline view to show the elements in the editor. Its the normal eclipse outline view and it has options A-Z sorting and Link with editor toolbar buttons.
Now I have a requirement to add Collapse_All and Expand_All toolbar buttons to this Outline view. Is there any way I can do this?
Please do the needful. Thanks
[Updated on: Tue, 21 February 2012 09:44] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03382 seconds