Package org.csstudio.opibuilder.actions
Class AbstractWidgetTargetAction
java.lang.Object
org.csstudio.opibuilder.actions.AbstractWidgetTargetAction
- All Implemented Interfaces:
IActionDelegate,IObjectActionDelegate
- Direct Known Subclasses:
AddTabAfterAction,AddTabBeforeAction,ChangeTabIndexAction,ClearXYGraphAction,CreateGroupAction,DuplicateTabAction,FillParentContainerAction,LayoutWidgetsAction,LockUnlockChildrenAction,PerformAutoSizeAction,ReloadOPIAction,RemoveGroupAction,RemoveTabAction,RerouteConnectionAction,SelectAllInGroupAction,SelectParentAction,ShowXYGraphToolbarAction
The abstract action which will be performed on a widget target.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IStructuredSelectionThe current selection.protected IWorkbenchPart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(org.eclipse.gef.commands.Command command) Executes the givenCommandusing the command stack.protected org.eclipse.gef.commands.CommandStackReturns the editor's command stack.protected IStructuredSelectionvoidselectionChanged(IAction action, ISelection selection) voidsetActivePart(IAction action, IWorkbenchPart targetPart) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.ui.IActionDelegate
run
-
Field Details
-
targetPart
-
selection
The current selection.
-
-
Constructor Details
-
AbstractWidgetTargetAction
public AbstractWidgetTargetAction()
-
-
Method Details
-
setActivePart
- Specified by:
setActivePartin interfaceIObjectActionDelegate
-
execute
protected void execute(org.eclipse.gef.commands.Command command) Executes the givenCommandusing the command stack. The stack is obtained by callinggetCommandStack(), which usesIAdapatableto retrieve the stack from the workbench part.- Parameters:
command- the command to execute
-
getCommandStack
protected org.eclipse.gef.commands.CommandStack getCommandStack()Returns the editor's command stack. This is done by asking the workbench part for its CommandStack viaIAdaptable.getAdapter(java.lang.Class).- Returns:
- the command stack
-
selectionChanged
- Specified by:
selectionChangedin interfaceIActionDelegate
-
getSelection
-