Class OpenPreviewHandler
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.core.commands.AbstractHandler
-
- org.eclipse.emf.ecp.view.spi.treemasterdetail.ui.swt.MasterDetailAction
-
- org.eclipse.emf.ecp.view.model.internal.preview.actions.OpenPreviewHandler
-
- All Implemented Interfaces:
org.eclipse.core.commands.IHandler
,org.eclipse.core.commands.IHandler2
,IToolbarAction
public class OpenPreviewHandler extends MasterDetailAction implements IToolbarAction
Opens thePreviewView
.
-
-
Constructor Summary
Constructors Constructor Description OpenPreviewHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canExecute(java.lang.Object object)
java.lang.Object
execute(org.eclipse.core.commands.ExecutionEvent event)
void
execute(org.eclipse.emf.ecore.EObject object)
org.eclipse.jface.action.Action
getAction(java.lang.Object currentObject, org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
Returns the action to add to the toolbar.boolean
shouldShow(org.eclipse.emf.ecore.EObject eObject)
-
Methods inherited from class org.eclipse.emf.ecp.view.spi.treemasterdetail.ui.swt.MasterDetailAction
getTreeViewer
-
Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
-
-
-
-
Method Detail
-
execute
public java.lang.Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException
- Specified by:
execute
in interfaceorg.eclipse.core.commands.IHandler
- Throws:
org.eclipse.core.commands.ExecutionException
- See Also:
IHandler.execute(org.eclipse.core.commands.ExecutionEvent)
-
execute
public void execute(org.eclipse.emf.ecore.EObject object)
- Specified by:
execute
in classMasterDetailAction
- Parameters:
object
- TheEObject
on which the action is executed- See Also:
MasterDetailAction.execute(EObject)
-
shouldShow
public boolean shouldShow(org.eclipse.emf.ecore.EObject eObject)
- Specified by:
shouldShow
in classMasterDetailAction
- Parameters:
eObject
- theEObject
on which to test if the action can be executed- Returns:
- true if the action can be executed on the parameter
eObject
- See Also:
MasterDetailAction.shouldShow(org.eclipse.emf.ecore.EObject)
-
getAction
public org.eclipse.jface.action.Action getAction(java.lang.Object currentObject, org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
Description copied from interface:IToolbarAction
Returns the action to add to the toolbar.- Specified by:
getAction
in interfaceIToolbarAction
- Parameters:
currentObject
- the currently edited object of the editorselectionProvider
- the selection provider- Returns:
- the action
-
canExecute
public boolean canExecute(java.lang.Object object)
- Specified by:
canExecute
in interfaceIToolbarAction
- Parameters:
object
- the currently edited object of the editor- Returns:
- true, if the Action can be executed for the provided input
-
-