Validation

org.topcased.validation.ui.actions
Class ValidateAction

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.jface.action.AbstractAction
          extended by org.eclipse.jface.action.Action
              extended by org.topcased.validation.ui.actions.ValidateAction
All Implemented Interfaces:
org.eclipse.jface.action.IAction

public class ValidateAction
extends org.eclipse.jface.action.Action

Validate a model with the extensible validation process.
creation : 11 janv. 2006


Field Summary
static java.lang.String ID
          Action ID
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
ValidateAction(org.eclipse.core.resources.IFile f, EObject eObject)
          Constructor
 
Method Summary
protected  boolean calculateEnabled()
          Determine if the action is valid
protected  void init()
          Initializes the action
protected  void refresh()
          Refreshes the properties of this action.
 void run()
          Validate a list of EObjects
protected  void setFile(org.eclipse.core.resources.IFile f)
          Set the file where the model is stored
protected  void setModel(EObject eObject)
          Set the model that must be validated
 
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

ID

public static final java.lang.String ID
Action ID

See Also:
Constant Field Values
Constructor Detail

ValidateAction

public ValidateAction(org.eclipse.core.resources.IFile f,
                      EObject eObject)
Constructor

Parameters:
f - The validated file
eObject - the validated model
Method Detail

run

public void run()
Validate a list of EObjects

Specified by:
run in interface org.eclipse.jface.action.IAction
Overrides:
run in class org.eclipse.jface.action.Action
See Also:
IAction.run()

calculateEnabled

protected boolean calculateEnabled()
Determine if the action is valid

Returns:
if the action can be executed

init

protected void init()
Initializes the action


setFile

protected void setFile(org.eclipse.core.resources.IFile f)
Set the file where the model is stored

Parameters:
f - the file

setModel

protected void setModel(EObject eObject)
Set the model that must be validated

Parameters:
eObject - the model

refresh

protected void refresh()
Refreshes the properties of this action.


Validation

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.