|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
org.eclipse.ui.handlers.CollapseAllHandler
Collapse a tree viewer.
It can be used in a part's createPartControl(Composite) method:
IHandlerService handlerService = (IHandlerService) getSite().getService( IHandlerService.class); collapseHandler = new CollapseAllHandler(myViewer); handlerService.activateHandle(CollapseAllHandler.COMMAND_ID, collapseHandler);The part should dispose the handler in its own dispose() method. The part can provide its own collapse all handler if desired, or if it needs to delegate to multiple tree viewers.
Note: This class can be instantiated. It should not be subclasses.
Field Summary | |
static String |
COMMAND_ID
The command id for collapse all. |
Constructor Summary | |
CollapseAllHandler(AbstractTreeViewer viewer)
Create the handler for this tree viewer. |
Method Summary | |
void |
dispose()
The default implementation does nothing. |
Object |
execute(ExecutionEvent event)
Executes with the map of parameter values by name. |
Methods inherited from class org.eclipse.core.commands.AbstractHandler |
addHandlerListener, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled |
Methods inherited from class org.eclipse.core.commands.common.EventManager |
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String COMMAND_ID
Constructor Detail |
public CollapseAllHandler(AbstractTreeViewer viewer)
viewer
- The viewer to collapse. Must not be null
.Method Detail |
public Object execute(ExecutionEvent event)
IHandler
event
- An event containing all the information about the current
state of the application; must not be null
.
null
.public void dispose()
AbstractHandler
dispose
in interface IHandler
dispose
in class AbstractHandler
IHandler.dispose()
|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.