com.ibm.jdg2e.jdt.extras
Class JavaBrowsingAction

java.lang.Object
  extended bycom.ibm.jdg2e.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 displays messages about the parameters and selection.

Note: Generally, it's better to 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 displays messages about the selection.
 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

run

public void run(org.eclipse.jface.action.IAction action)
This example run method only displays messages about the selection.

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