public abstract class SafeHandler extends AbstractHandler
Constructor and Description |
---|
SafeHandler() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
execute(ExecutionEvent event) |
protected void |
extractEventDetails(ExecutionEvent event)
Extracts details from the
event 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) |
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
public Command getCommand()
public ISelection getSelection()
public java.lang.Object execute(ExecutionEvent event) throws ExecutionException
ExecutionException
public void setEnabled(java.lang.Object evaluationContext)
setEnabled
in interface IHandler2
setEnabled
in class AbstractHandler
protected void extractEventDetails(ExecutionEvent event)
event
that we may need later,
for example on a background thread when the original execution
context is no longer valid.protected abstract java.lang.Object safeExecute(ExecutionEvent event) throws java.lang.Exception
java.lang.Exception
protected java.lang.String getText()
protected boolean updateSelection(ISelection selection)
Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html