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 SummaryConstructors Constructor Description SafeHandler()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Objectexecute(ExecutionEvent event)protected voidextractEventDetails(ExecutionEvent event)Extracts details from theeventthat we may need later, for example on a background thread when the original execution context is no longer valid.CommandgetCommand()ISelectiongetSelection()protected java.lang.StringgetText()protected abstract java.lang.ObjectsafeExecute(ExecutionEvent event)voidsetEnabled(java.lang.Object evaluationContext)protected booleanupdateSelection(ISelection selection)- 
Methods inherited from class org.eclipse.core.commands.AbstractHandleraddHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled
 - 
Methods inherited from class org.eclipse.core.commands.common.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
- 
 
- 
- 
- 
Method Detail- 
getCommandpublic Command getCommand() 
 - 
getSelectionpublic ISelection getSelection() 
 - 
executepublic java.lang.Object execute(ExecutionEvent event) throws ExecutionException - Throws:
- ExecutionException
 
 - 
setEnabledpublic void setEnabled(java.lang.Object evaluationContext) - Specified by:
- setEnabledin interface- IHandler2
- Overrides:
- setEnabledin class- AbstractHandler
 
 - 
extractEventDetailsprotected void extractEventDetails(ExecutionEvent event) Extracts details from theeventthat we may need later, for example on a background thread when the original execution context is no longer valid.
 - 
safeExecuteprotected abstract java.lang.Object safeExecute(ExecutionEvent event) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 - 
getTextprotected java.lang.String getText() 
 - 
updateSelectionprotected boolean updateSelection(ISelection selection) 
 
- 
 
-