edu.cmu.sei.osate.ui.actions
Class AaxlReadOnlyAction

java.lang.Object
  extended by edu.cmu.sei.osate.ui.actions.AbstractAaxlAction
      extended by edu.cmu.sei.osate.ui.actions.AaxlReadOnlyAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IObjectActionDelegate, org.eclipse.ui.IWorkbenchWindowActionDelegate
Direct Known Subclasses:
AaxlModifyAction

Deprecated. Usage of this class should be replaced with AaxlReadOnlyActionAsJob.

public abstract class AaxlReadOnlyAction
extends AbstractAaxlAction

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.)

Author:
aarong

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 edu.cmu.sei.osate.ui.actions.AbstractAaxlAction
actionBody, dispose, error, getAnalysisErrorReporterFactory, getBundle, getDefaultAnalysisErrorReporterFactory, getErrorManager, getMarkerType, getPropertyLookupErrors, getShell, getWindow, hasPropertyLookupErrors, info, init, initPropertyReferences, internalError, internalError, lookupEnumerationLiteral, lookupEnumerationLiteral, lookupOptionalPropertyConstant, lookupOptionalPropertyDefinition, lookupOptionalPropertyType, lookupPropertyConstant, lookupPropertyConstant, lookupPropertyDefinition, lookupPropertyDefinition, lookupPropertyType, lookupPropertyType, lookupUnitLiteral, lookupUnitLiteral, reportPropertyLookupErrors, run, selectionChanged, setActivePart, suppressErrorMessages, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AaxlReadOnlyAction

public AaxlReadOnlyAction()
Deprecated. 
The constructor.

Method Detail

createJob

protected org.eclipse.core.runtime.jobs.Job createJob(AObject root)
Deprecated. 
Specified by:
createJob in class AbstractAaxlAction

doAaxlAction

protected final void doAaxlAction(org.eclipse.core.runtime.IProgressMonitor monitor,
                                  AObject root)
Deprecated. 
Description copied from class: AbstractAaxlAction
This method will be defined by the ultimate subclass, and implements the true body of the action. It is invoked along a call chain from the 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.

Specified by:
doAaxlAction in class AbstractAaxlAction
Parameters:
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.

doAaxlAction

public abstract void doAaxlAction(AObject root)
Deprecated. 
This method will be defined by the plugin. This should really be protected and not public, but we have external clients now so it's too late to change it.

Parameters:
root -