Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.handlers
Class CollapseAllHandler


java.lang.Object
  extended by 

org.eclipse.core.commands.common.EventManager
      extended by 

org.eclipse.core.commands.AbstractHandler
          extended by 
org.eclipse.ui.handlers.CollapseAllHandler
All Implemented Interfaces:
IHandler, IHandler2

public class CollapseAllHandler
extends AbstractHandler

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.activateHandler(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.

Since:
3.4

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

COMMAND_ID

public static final 
String COMMAND_ID
The command id for collapse all.

See Also:
Constant Field Values
Constructor Detail

CollapseAllHandler

public CollapseAllHandler(
AbstractTreeViewer viewer)
Create the handler for this tree viewer.

Parameters:
viewer - The viewer to collapse. Must not be null.
Method Detail

execute

public 
Object execute(
ExecutionEvent event)
Description copied from interface: IHandler
Executes with the map of parameter values by name.

Parameters:
event - An event containing all the information about the current state of the application; must not be null.
Returns:
the result of the execution. Reserved for future use, must be null.

dispose

public void dispose()
Description copied from class: AbstractHandler
The default implementation does nothing. Subclasses who attach listeners to other objects are encouraged to detach them in this method.

Specified by:
dispose in interface IHandler
Overrides:
dispose in class AbstractHandler
See Also:
IHandler.dispose()

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire