public abstract class SafeHandler extends AbstractHandler
Constructor and Description |
---|
SafeHandler() |
Modifier and Type | Method and Description |
---|---|
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 String |
getText() |
protected abstract Object |
safeExecute(ExecutionEvent event) |
void |
setEnabled(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 Object execute(ExecutionEvent event) throws ExecutionException
ExecutionException
public void setEnabled(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 Object safeExecute(ExecutionEvent event) throws Exception
Exception
protected String getText()
protected boolean updateSelection(ISelection selection)
Copyright (c) 2014 Eike Stepper (Berlin, 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