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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ExecutionEvent event) protected voidExtracts details from theeventthat we may need later, for example on a background thread when the original execution context is no longer valid.protected StringgetText()protected abstract ObjectsafeExecute(ExecutionEvent event) voidsetEnabled(Object evaluationContext) protected booleanupdateSelection(ISelection selection) Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabledMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.commands.IHandler
getHandlerLabel
-
Constructor Details
-
SafeHandler
public SafeHandler()
-
-
Method Details
-
getCommand
-
getSelection
-
execute
- Throws:
ExecutionException
-
setEnabled
- Specified by:
setEnabledin interfaceIHandler2- Overrides:
setEnabledin classAbstractHandler
-
extractEventDetails
Extracts details from theeventthat we may need later, for example on a background thread when the original execution context is no longer valid. -
safeExecute
- Throws:
Exception
-
getText
-
updateSelection
-