Package org.csstudio.ui.util
Class AbstractAdaptedHandler<T>
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
org.csstudio.ui.util.AbstractAdaptedHandler<T>
Abstract class for all commands that use AdapterUtil for conversion and displays the exception in a suitable dialog.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
execute
(List<T> data, ExecutionEvent event) Implements the command.execute
(ExecutionEvent event) static <T> T
Searches for the view of the given class with the given view id.Methods inherited from class org.eclipse.core.commands.AbstractHandler
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
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
-
AbstractAdaptedHandler
-
-
Method Details
-
findView
Searches for the view of the given class with the given view id.- Parameters:
clazz
- the view classviewId
- the view id- Returns:
- the view
- Throws:
PartInitException
- if the view was not foundClassCastException
- if the view is of a different type
-
execute
- Throws:
ExecutionException
-
execute
Implements the command. The selection is already converted to the target class.- Parameters:
data
- data in the selectionevent
- event of the command- Throws:
Exception
-