org.eclipse.emf.edit.ui.action
Class DelegatingCommandAction
java.lang.Object
org.eclipse.jface.action.Action
org.eclipse.emf.edit.ui.action.DelegatingCommandAction
- All Implemented Interfaces:
- IAction, ISelectionChangedListener, ISelectionListener
- public class DelegatingCommandAction
- extends Action
- implements ISelectionListener, ISelectionChangedListener
This class wraps an IEditorActionDelegate
, e.g., a CommandAction
, to make it into an Action
.
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, RESULT, TEXT, TOOL_TIP_TEXT |
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, isEnabled, notifyResult, removeAcceleratorText, removeMnemonics, 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 |
editorActionDelegate
protected IEditorActionDelegate editorActionDelegate
- This is the delegate;
editorPart
protected IEditorPart editorPart
- This is the current editor.
DelegatingCommandAction
public DelegatingCommandAction(IEditorActionDelegate editorActionDelegate)
- This constructs an instance.
selectionChanged
public void selectionChanged(SelectionChangedEvent event)
- Specified by:
selectionChanged
in interface ISelectionChangedListener
selectionChanged
public void selectionChanged(IWorkbenchPart part,
ISelection selection)
- Specified by:
selectionChanged
in interface ISelectionListener
selectionChanged
protected void selectionChanged(ISelection selection)
handleSelection
protected void handleSelection(ISelection selection)
registerSelectionListener
protected void registerSelectionListener(IEditorPart editorPart)
unregisterSelectionListener
protected void unregisterSelectionListener(IEditorPart editorPart)
setActiveEditor
public void setActiveEditor(IEditorPart editorPart)
run
public void run()
- Specified by:
run
in interface IAction