com.ibm.lab.soln.contributions
Class TreeViewerCollapseNodesAction

java.lang.Object
  |
  +--com.ibm.lab.soln.contributions.TreeViewerCollapseNodesAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IViewActionDelegate
Direct Known Subclasses:
PackageExplorerCollapseNodesAction, ResourceNavigatorCollapseNodesAction

public abstract class TreeViewerCollapseNodesAction
extends java.lang.Object
implements org.eclipse.ui.IViewActionDelegate

This action will collapse the selected nodes of the TreeViewer supplied by its subclass. If no nodes are selected, it will collapse the entire tree. Subclasses must extend the abstract method getViewer which provides the TreeViewer on which to perform the collapse nodes operation.

See Also:
IViewActionDelegate

Constructor Summary
TreeViewerCollapseNodesAction()
           
 
Method Summary
protected abstract  org.eclipse.jface.viewers.TreeViewer getTreeViewer()
          Subclass must override this method.
 void init(org.eclipse.ui.IViewPart vp)
          Save a reference to the view.
 void run(org.eclipse.jface.action.IAction action)
          Collapses the expanded nodes of the viewer.
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeViewerCollapseNodesAction

public TreeViewerCollapseNodesAction()
Method Detail

getTreeViewer

protected abstract org.eclipse.jface.viewers.TreeViewer getTreeViewer()
Subclass must override this method.
Returns:
org.eclipse.jface.viewers.TreeViewer

init

public void init(org.eclipse.ui.IViewPart vp)
Save a reference to the view.
Specified by:
init in interface org.eclipse.ui.IViewActionDelegate
See Also:
IViewActionDelegate.init(IViewPart)

run

public void run(org.eclipse.jface.action.IAction action)
Collapses the expanded nodes of the viewer.
Specified by:
run in interface org.eclipse.ui.IActionDelegate
See Also:
IActionDelegate.run(IAction)

selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)
Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate
See Also:
IActionDelegate.selectionChanged(IAction, ISelection)