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

java.lang.Object
  extended by edu.cmu.sei.osate.ui.actions.AbstractAaxlAction
      extended by edu.cmu.sei.osate.ui.actions.AaxlReadOnlyActionAsJob
          extended by edu.cmu.sei.osate.ui.actions.CheckModelSanity
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IObjectActionDelegate, org.eclipse.ui.IWorkbenchWindowActionDelegate

public final class CheckModelSanity
extends AaxlReadOnlyActionAsJob


Constructor Summary
CheckModelSanity()
           
 
Method Summary
 void doAaxlAction(org.eclipse.core.runtime.IProgressMonitor monitor, AObject obj)
          This method will be defined by the ultimate subclass, and implements the true body of the action.
protected  java.lang.String getActionName()
          Get the name of the action to display in the Job, etc.
protected  org.osgi.framework.Bundle getBundle()
          Get the bundle ("plug-in") to attribute internal errors to.
protected  java.lang.String getMarkerType()
          Get the type of the markers that the action might create.
 
Methods inherited from class edu.cmu.sei.osate.ui.actions.AaxlReadOnlyActionAsJob
createJob
 
Methods inherited from class edu.cmu.sei.osate.ui.actions.AbstractAaxlAction
actionBody, dispose, error, getAnalysisErrorReporterFactory, getDefaultAnalysisErrorReporterFactory, getErrorManager, 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

CheckModelSanity

public CheckModelSanity()
Method Detail

getBundle

protected org.osgi.framework.Bundle getBundle()
Description copied from class: AbstractAaxlAction
Get the bundle ("plug-in") to attribute internal errors to.

Subclasses should override this method to return the bundle in which they are located. The default value is to return the bundle associated with edu.cmu.sei.osate.ui.

Overrides:
getBundle in class AbstractAaxlAction
Returns:
The bundle to blame internal errors on.

getMarkerType

protected java.lang.String getMarkerType()
Description copied from class: AbstractAaxlAction
Get the type of the markers that the action might create. This is used to create a new MarkerAnalysisErrorReporterfor that marker type for the resource being analyzed. Any existing markers of that type on the resource will be removed.

Subclasses should override this method to change the marker type used by the action. The initial implementation returns the generic "AadlObjectMarker" marker type, and will therefore cause all existing OSATE markers to be removed from the resource.

Overrides:
getMarkerType in class AbstractAaxlAction
Returns:
The marker type to use for the action's results. This initial implementation specifically returns "AadlObjectMarker".
See Also:
AbstractAaxlAction.getDefaultAnalysisErrorReporterFactory(), AbstractAaxlAction.getAnalysisErrorReporterFactory()

getActionName

protected java.lang.String getActionName()
Description copied from class: AaxlReadOnlyActionAsJob
Get the name of the action to display in the Job, etc.

Specified by:
getActionName in class AaxlReadOnlyActionAsJob

doAaxlAction

public void doAaxlAction(org.eclipse.core.runtime.IProgressMonitor monitor,
                         AObject obj)
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.
obj - The currently selected AObject in the workspace.