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
Modifier and TypeFieldDescriptionprotected IStructuredSelection
The current selection.protected IWorkbenchPart
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
execute
(org.eclipse.gef.commands.Command command) Executes the givenCommand
using the command stack.protected org.eclipse.gef.commands.CommandStack
Returns the editor's command stack.protected IStructuredSelection
void
selectionChanged
(IAction action, ISelection selection) void
setActivePart
(IAction action, IWorkbenchPart targetPart) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
setActivePart
in interfaceIObjectActionDelegate
-
execute
protected void execute(org.eclipse.gef.commands.Command command) Executes the givenCommand
using the command stack. The stack is obtained by callinggetCommandStack()
, which usesIAdapatable
to 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:
selectionChanged
in interfaceIActionDelegate
-
getSelection
-