org.jmlspecs.eclipse.jdt.ui
Class EscjavaAction

java.lang.Object
  extended by org.jmlspecs.eclipse.jdt.ui.EscjavaAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IObjectActionDelegate, org.eclipse.ui.IWorkbenchWindowActionDelegate
Direct Known Subclasses:
EscjavaAction.Check, EscjavaAction.Clear, EscjavaAction.ESC, EscjavaAction.GoToDecl

public abstract class EscjavaAction
extends java.lang.Object
implements org.eclipse.ui.IObjectActionDelegate, org.eclipse.ui.IWorkbenchWindowActionDelegate

This class and its subclasses are the classes that respond to Menu actions.

Author:
David R. Cok

Nested Class Summary
static class EscjavaAction.Check
          This class implements the action for checking files using EscJava2
static class EscjavaAction.Clear
          This class implements the action that clears EscJava markers.
static class EscjavaAction.ESC
           
static class EscjavaAction.GoToDecl
          This class implements the action that opens and positions an editor on an associated declaration of a marker.
 
Constructor Summary
EscjavaAction()
           
 
Method Summary
 void dispose()
          We can use this method to dispose of any system resources we previously allocated.
 void init(org.eclipse.ui.IWorkbenchWindow window)
          We will cache window object in order to be able to provide parent shell for the message dialog.
 void iterateByPFR(java.util.Map map)
          Iterates over all the package fragment roots in the map, calling start/doit/end for each package fragment root and its Collection.
 void iterateByProject(java.util.Map map)
          Iterates over all the projects in the map (as produced by getJavaElements()), calling start/doit/end for each project's collection of IJavaElements and IResources.
 void run(org.eclipse.jface.action.IAction action)
           
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
           
 void setActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart targetPart)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EscjavaAction

public EscjavaAction()
Method Detail

setActivePart

public final void setActivePart(org.eclipse.jface.action.IAction action,
                                org.eclipse.ui.IWorkbenchPart targetPart)
Specified by:
setActivePart in interface org.eclipse.ui.IObjectActionDelegate

selectionChanged

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

dispose

public void dispose()
We can use this method to dispose of any system resources we previously allocated.

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchWindowActionDelegate
See Also:
IWorkbenchWindowActionDelegate.dispose()

init

public void init(org.eclipse.ui.IWorkbenchWindow window)
We will cache window object in order to be able to provide parent shell for the message dialog.

Specified by:
init in interface org.eclipse.ui.IWorkbenchWindowActionDelegate
Parameters:
window - The parent window
See Also:
IWorkbenchWindowActionDelegate.init(org.eclipse.ui.IWorkbenchWindow)

run

public void run(org.eclipse.jface.action.IAction action)
Specified by:
run in interface org.eclipse.ui.IActionDelegate

iterateByProject

public void iterateByProject(java.util.Map map)
Iterates over all the projects in the map (as produced by getJavaElements()), calling start/doit/end for each project's collection of IJavaElements and IResources. The order of iteration is that supplied by orderedProjectsIterator(map). The map must be indexed by project. Expected to be called in the UI thread.

Parameters:
map - The map containing IJavaProjects and their Collections of IJavaElements and IResources.

iterateByPFR

public void iterateByPFR(java.util.Map map)
Iterates over all the package fragment roots in the map, calling start/doit/end for each package fragment root and its Collection. The map must be indexed by package fragment root.

Parameters:
map - The map containing IPackageFragmentRoot keys and Collection values