|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.emf.emfstore.internal.client.ui.util.EMFStoreHandlerUtil
public final class EMFStoreHandlerUtil
This class provides helper methods that can determine the currently selected element.
| Method Summary | ||
|---|---|---|
static
|
getSelection(org.eclipse.core.commands.ExecutionEvent event,
Class<T> clazz)
Extracts element from event. |
|
static
|
requireSelection(org.eclipse.core.commands.ExecutionEvent event,
Class<T> clazz)
Returns an object of the given clazz if it can be extracted from
the current selection. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> T getSelection(org.eclipse.core.commands.ExecutionEvent event,
Class<T> clazz)
T - the type of the object to extractevent - the eventclazz - class type of the object to extract
public static <T> T requireSelection(org.eclipse.core.commands.ExecutionEvent event,
Class<T> clazz)
throws RequiredSelectionException
clazz if it can be extracted from
the current selection.
T - the type of the object to be extracted from the current selectionevent - the event from which to extract the selectionclazz - the type of the object that is requested to be extracted from the current selection
RequiredSelectionException - if the selection is invalid, i.e. if no object of the given type is contained in the selection
or if the selection is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||