be.ac.vub.cocompose.eclipse.actions
Class ApplySolutionPatternAction

java.lang.Object
  extended byorg.eclipse.jface.action.Action
      extended byorg.eclipse.gef.ui.actions.WorkbenchPartAction
          extended byorg.eclipse.gef.ui.actions.EditorPartAction
              extended byorg.eclipse.gef.ui.actions.SelectionAction
                  extended bybe.ac.vub.cocompose.eclipse.actions.ApplySolutionPatternAction
All Implemented Interfaces:
Disposable, IAction, UpdateAction

public class ApplySolutionPatternAction
extends SelectionAction

Applies a solution pattern in the current model.

Since:
0.2.11
Version:
0.2.11, 17/05/2004
Author:
Dennis Wagelaar

Field Summary
static String 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, IMAGE, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
ApplySolutionPatternAction(CoComposeEditor editor, ModelFactory factory)
          Creates an ApplySolutionPatternAction.
 
Method Summary
protected  boolean calculateEnabled()
           
protected  Command getCommand()
          Creates the command to be executed.
 SolutionPattern getSolutionPattern()
          Gets the selected solution pattern.
protected  void handleSelectionChanged()
           
 void run()
           
protected  void setSolutionPattern(SolutionPattern pattern)
          Sets the selected solution pattern.
 
Methods inherited from class org.eclipse.gef.ui.actions.SelectionAction
dispose, getSelectedObjects, getSelection, setSelection, setSelectionProvider, update
 
Methods inherited from class org.eclipse.gef.ui.actions.EditorPartAction
getEditorPart, setEditorPart
 
Methods inherited from class org.eclipse.gef.ui.actions.WorkbenchPartAction
execute, getCommandStack, getWorkbenchPart, init, isEnabled, refresh, setLazyEnablementCalculation, setWorkbenchPart
 
Methods inherited from class org.eclipse.jface.action.Action
addPropertyChangeListener, convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, firePropertyChange, firePropertyChange, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, removeAcceleratorText, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values
Constructor Detail

ApplySolutionPatternAction

public ApplySolutionPatternAction(CoComposeEditor editor,
                                  ModelFactory factory)
Creates an ApplySolutionPatternAction.

Parameters:
editor - the CoCompose editor.
factory - the model element factory.
Method Detail

run

public void run()
See Also:
IAction.run()

getSolutionPattern

public SolutionPattern getSolutionPattern()
Gets the selected solution pattern.

Returns:
the selected solution pattern.

setSolutionPattern

protected void setSolutionPattern(SolutionPattern pattern)
Sets the selected solution pattern.

Parameters:
pattern - the selected solution pattern.

calculateEnabled

protected boolean calculateEnabled()
See Also:
WorkbenchPartAction.calculateEnabled()

getCommand

protected Command getCommand()
Creates the command to be executed.

Returns:
the command.

handleSelectionChanged

protected void handleSelectionChanged()
See Also:
SelectionAction.handleSelectionChanged()