Class SafeHandler
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.core.commands.AbstractHandler
-
- org.eclipse.net4j.util.ui.handlers.SafeHandler
-
- Direct Known Subclasses:
LongRunningHandler
public abstract class SafeHandler extends AbstractHandler
- Since:
- 3.4
- Author:
- Eike Stepper, Christian W. Damus (CEA LIST)
-
-
Constructor Summary
Constructors Constructor Description SafeHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Object
execute(ExecutionEvent event)
protected void
extractEventDetails(ExecutionEvent event)
Extracts details from theevent
that we may need later, for example on a background thread when the original execution context is no longer valid.Command
getCommand()
ISelection
getSelection()
protected java.lang.String
getText()
protected abstract java.lang.Object
safeExecute(ExecutionEvent event)
void
setEnabled(java.lang.Object evaluationContext)
protected boolean
updateSelection(ISelection selection)
-
Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled
-
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
-
-
-
Method Detail
-
getCommand
public Command getCommand()
-
getSelection
public ISelection getSelection()
-
execute
public java.lang.Object execute(ExecutionEvent event) throws ExecutionException
- Throws:
ExecutionException
-
setEnabled
public void setEnabled(java.lang.Object evaluationContext)
- Specified by:
setEnabled
in interfaceIHandler2
- Overrides:
setEnabled
in classAbstractHandler
-
extractEventDetails
protected void extractEventDetails(ExecutionEvent event)
Extracts details from theevent
that we may need later, for example on a background thread when the original execution context is no longer valid.
-
safeExecute
protected abstract java.lang.Object safeExecute(ExecutionEvent event) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getText
protected java.lang.String getText()
-
updateSelection
protected boolean updateSelection(ISelection selection)
-
-