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
- Since:
- 3.4
- Author:
- Eike Stepper, Christian W. Damus (CEA LIST)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(ExecutionEvent event) protected void
Extracts details from theevent
that we may need later, for example on a background thread when the original execution context is no longer valid.protected String
getText()
protected abstract Object
safeExecute
(ExecutionEvent event) void
setEnabled
(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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.core.commands.IHandler
getHandlerLabel
-
Constructor Details
-
SafeHandler
public SafeHandler()
-
-
Method Details
-
getCommand
-
getSelection
-
execute
- Throws:
ExecutionException
-
setEnabled
- Specified by:
setEnabled
in interfaceIHandler2
- Overrides:
setEnabled
in classAbstractHandler
-
extractEventDetails
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
- Throws:
Exception
-
getText
-
updateSelection
-