public class OpenPreviewHandler extends MasterDetailAction implements IToolbarAction
PreviewView
.Constructor and Description |
---|
OpenPreviewHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute(Object object) |
void |
execute(org.eclipse.emf.ecore.EObject object) |
Object |
execute(org.eclipse.core.commands.ExecutionEvent event) |
org.eclipse.jface.action.Action |
getAction(Object currentObject,
org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
Returns the action to add to the toolbar.
|
boolean |
shouldShow(org.eclipse.emf.ecore.EObject eObject) |
getTreeViewer
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException
execute
in interface org.eclipse.core.commands.IHandler
org.eclipse.core.commands.ExecutionException
IHandler.execute(org.eclipse.core.commands.ExecutionEvent)
public void execute(org.eclipse.emf.ecore.EObject object)
execute
in class MasterDetailAction
object
- The EObject
on which the action is executedMasterDetailAction.execute(EObject)
public boolean shouldShow(org.eclipse.emf.ecore.EObject eObject)
shouldShow
in class MasterDetailAction
eObject
- the EObject
on which to test if the action can be executedeObject
MasterDetailAction.shouldShow(org.eclipse.emf.ecore.EObject)
public org.eclipse.jface.action.Action getAction(Object currentObject, org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
IToolbarAction
getAction
in interface IToolbarAction
currentObject
- the currently edited object of the editorselectionProvider
- the selection providerpublic boolean canExecute(Object object)
canExecute
in interface IToolbarAction
object
- the currently edited object of the editorCopyright © 2019. All rights reserved.