de.cau.cs.kieler.core.model.validation
Class AbstractValidationActionFactory

java.lang.Object
  extended by de.cau.cs.kieler.core.model.validation.AbstractValidationActionFactory
All Implemented Interfaces:
IValidationActionFactory
Direct Known Subclasses:
AbstractXtextEditorValidationActionFactory, PapyrusValidationActionFactory, SyncchartsValidationActionFactory

public abstract class AbstractValidationActionFactory
extends Object
implements IValidationActionFactory

Abstract implementation of a factory for validate actions. Gathers all information and produces a validate action for the currently active editor.

Rating red

Constructor Summary
AbstractValidationActionFactory()
           
 
Method Summary
abstract  Action getValidationAction(IWorkbenchPage page)
          Construct a validate action.
 Action getValidationActionForActiveEditor()
          Get the validate action for the active editor.
 Action getValidationActionForEditor(IEditorPart editor)
          Get the validate action for the active editor.
abstract  boolean supportsEditor(IEditorPart editor)
          Check if the active editor is supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractValidationActionFactory

public AbstractValidationActionFactory()
Method Detail

getValidationAction

public abstract Action getValidationAction(IWorkbenchPage page)
Construct a validate action. The currently active editor is assumed to be correct at this point.

Parameters:
page - the page
Returns:
the action

supportsEditor

public abstract boolean supportsEditor(IEditorPart editor)
Check if the active editor is supported.

Parameters:
editor - the editor to check
Returns:
true if the editor is supported

getValidationActionForEditor

public Action getValidationActionForEditor(IEditorPart editor)
Get the validate action for the active editor. Should return null if the editor is not supported.

Specified by:
getValidationActionForEditor in interface IValidationActionFactory
Parameters:
editor - the editor
Returns:
the action or null

getValidationActionForActiveEditor

public Action getValidationActionForActiveEditor()
Get the validate action for the active editor. Should return null if the active editor is not supported.

Specified by:
getValidationActionForActiveEditor in interface IValidationActionFactory
Returns:
the action or null