|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sei.osate.ui.actions.AbstractAaxlAction
edu.cmu.sei.osate.ui.actions.AaxlReadOnlyAction
AaxlReadOnlyActionAsJob
.
public abstract class AaxlReadOnlyAction
Abstract class for actions button/menu and context menu menu actions that
operate on AAXL models. The body of the action is implemented in the
doAaxlAction(AObject)
method. The AbstractAaxlAction.getMarkerType()
method
should also be overridden to return the name of the marker type the analysis
should use to report errors.
The action is invoked in a UIJob
that also
wraps the action as a IWorkspaceRunnable
.
In this way, the action runs in the UI/SWT thread and is thus able to create
dialog boxes without worry. The downside is that the action locks up
Eclipse's user interface. As an workspace runnable, a single workspace event
(if any) is sent at the end of the action, and, more importantly, the
workspace is locked from the root object. Thus the action has exclusive
access to all the models in the workspace.
This actions puts up a generic progress bar. Subclasses do not have
access to the progress bar, and thus cannot update its status. (This class
exists to be an API-compatible replacement to the original AaxlReadOnlyAction
class. The new preferred class is AaxlReadOnlyActionAsJob
that does provide access to the progress bar.)
Constructor Summary | |
---|---|
AaxlReadOnlyAction()
Deprecated. The constructor. |
Method Summary | |
---|---|
protected org.eclipse.core.runtime.jobs.Job |
createJob(AObject root)
Deprecated. |
abstract void |
doAaxlAction(AObject root)
Deprecated. This method will be defined by the plugin. |
protected void |
doAaxlAction(org.eclipse.core.runtime.IProgressMonitor monitor,
AObject root)
Deprecated. This method will be defined by the ultimate subclass, and implements the true body of the action. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AaxlReadOnlyAction()
Method Detail |
---|
protected org.eclipse.core.runtime.jobs.Job createJob(AObject root)
createJob
in class AbstractAaxlAction
protected final void doAaxlAction(org.eclipse.core.runtime.IProgressMonitor monitor, AObject root)
AbstractAaxlAction
AbstractAaxlAction.run(IAction)
method, which first makes sure the OSATE
environment is loaded and other house cleaning things.
It is a good idea, although not required, for the action to check to see
if the action has been cancelled
.
If cancellation is detected, this method should throw the unchecked
exception OperationCanceledException
.
doAaxlAction
in class AbstractAaxlAction
monitor
- The progress monitor to use to provide feedback about the
action and to check for cancellation.root
- The currently selected AObject in the workspace.public abstract void doAaxlAction(AObject root)
protected
and not public
, but we have external
clients now so it's too late to change it.
root
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |