com.ibm.lab.soln.jdt.extras
Class JavaBrowsingAction

java.lang.Object
  |
  +--com.ibm.lab.soln.jdt.extras.JavaBrowsingAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IViewActionDelegate

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

Simple view action targeted towards the views of the Java Browsing perspective (Projects, Packages, Types, Members). It does nothing useful, only writes messages to the Console about the parameters and selection.

Note: Generally, you create a separate action delegate per view in order to avoid lots of selection casting in the run method. This example cheats (a little) by having a single action delegate and testing for the selection type.


Constructor Summary
JavaBrowsingAction()
           
 
Method Summary
 void init(org.eclipse.ui.IViewPart view)
           
 void run(org.eclipse.jface.action.IAction action)
          This example run method only prints to the Console.
 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

JavaBrowsingAction

public JavaBrowsingAction()
Method Detail

init

public void init(org.eclipse.ui.IViewPart 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)
This example run method only prints to the Console.

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)