Class DelegatingMasterDetailAction
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.core.commands.AbstractHandler
-
- org.eclipse.emfforms.spi.swt.treemasterdetail.actions.MasterDetailAction
-
- org.eclipse.emfforms.spi.swt.treemasterdetail.actions.KeybindedMasterDetailAction
-
- org.eclipse.emfforms.spi.swt.treemasterdetail.actions.delegating.DelegatingMasterDetailAction
-
- All Implemented Interfaces:
java.util.EventListener,org.eclipse.core.commands.IHandler,org.eclipse.core.commands.IHandler2,org.eclipse.jface.viewers.ISelectionChangedListener,org.eclipse.swt.events.KeyListener,org.eclipse.swt.internal.SWTEventListener
- Direct Known Subclasses:
CopyMasterDetailAction,CutMasterDetailAction,PasteMasterDetailAction
public abstract class DelegatingMasterDetailAction extends KeybindedMasterDetailAction
Abstract implementation of aKeybindedMasterDetailActionforwarding to aBaseSelectionListenerAction.- Since:
- 1.8
- Author:
- Stefan Dirix
-
-
Constructor Summary
Constructors Constructor Description DelegatingMasterDetailAction(org.eclipse.emf.edit.domain.EditingDomain editingDomain)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.eclipse.ui.actions.BaseSelectionListenerActioncreateDelegatedAction(org.eclipse.emf.edit.domain.EditingDomain editingDomain)Creates theBaseSelectionListenerActionto which thisKeybindedMasterDetailActionforwards to.voidexecute(java.util.List<java.lang.Object> objects)java.lang.Objectexecute(org.eclipse.core.commands.ExecutionEvent event)protected voidexecuteOnKeyRelease(org.eclipse.jface.viewers.ISelection currentSelection)This method is triggered byKeybindedMasterDetailAction.isExecuteOnKeyRelease(KeyEvent)when aKeyEventis triggered by a key release.org.eclipse.ui.actions.BaseSelectionListenerActiongetDelegatedAction()Returns theBaseSelectionListenerActionto which thisKeybindedMasterDetailActionforwards to.protected java.lang.StringgetEMFEditLabel()The label for theKeybindedMasterDetailAction.protected abstract java.lang.StringgetEMFImagePath()The path to the image for theBaseSelectionListenerAction.booleanshouldShow(java.util.List<java.lang.Object> objects)-
Methods inherited from class org.eclipse.emfforms.spi.swt.treemasterdetail.actions.KeybindedMasterDetailAction
executeOnKeyPressed, getCurrentSelection, isActivated, isExecuteOnKeyPressed, isExecuteOnKeyRelease, isExecuteOnKeyRelease, keyPressed, keyReleased, selectionChanged, setExecuteOnKeyRelease, setTreeViewer
-
Methods inherited from class org.eclipse.emfforms.spi.swt.treemasterdetail.actions.MasterDetailAction
getImagePath, getLabel, getTreeViewer, setImagePath, setLabel
-
Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
-
-
-
-
Method Detail
-
getEMFEditLabel
protected java.lang.String getEMFEditLabel()
The label for theKeybindedMasterDetailAction.- Returns:
- The label for the
KeybindedMasterDetailAction.
-
getEMFImagePath
protected abstract java.lang.String getEMFImagePath()
The path to the image for theBaseSelectionListenerAction.- Returns:
- The path to the local image for the
BaseSelectionListenerAction.
-
createDelegatedAction
protected abstract org.eclipse.ui.actions.BaseSelectionListenerAction createDelegatedAction(org.eclipse.emf.edit.domain.EditingDomain editingDomain)
Creates theBaseSelectionListenerActionto which thisKeybindedMasterDetailActionforwards to.- Parameters:
editingDomain- TheEditingDomainwhich is used to create theBaseSelectionListenerAction.- Returns:
- The
BaseSelectionListenerActionto which thisKeybindedMasterDetailActionforwards to.
-
execute
public java.lang.Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException- Throws:
org.eclipse.core.commands.ExecutionException
-
execute
public void execute(java.util.List<java.lang.Object> objects)
- Specified by:
executein classMasterDetailAction- Parameters:
objects- The list of objects on which the action is executed
-
shouldShow
public boolean shouldShow(java.util.List<java.lang.Object> objects)
- Specified by:
shouldShowin classMasterDetailAction- Parameters:
objects- the list of objects on which to test if the action can be executed- Returns:
- true if the action can be executed on the parameter
-
getDelegatedAction
public org.eclipse.ui.actions.BaseSelectionListenerAction getDelegatedAction()
Returns theBaseSelectionListenerActionto which thisKeybindedMasterDetailActionforwards to.- Returns:
- The
BaseSelectionListenerActionthisKeybindedMasterDetailActionis forwarding to.
-
executeOnKeyRelease
protected void executeOnKeyRelease(org.eclipse.jface.viewers.ISelection currentSelection)
Description copied from class:KeybindedMasterDetailActionThis method is triggered byKeybindedMasterDetailAction.isExecuteOnKeyRelease(KeyEvent)when aKeyEventis triggered by a key release.- Specified by:
executeOnKeyReleasein classKeybindedMasterDetailAction- Parameters:
currentSelection- The currentISelection.
-
-