public final class HandlerUtils extends Object
Modifier and Type | Method and Description |
---|---|
static org.eclipse.ui.IWorkbenchPage |
getActivePage(org.eclipse.core.commands.ExecutionEvent event)
Get the active page from within a handler.
|
static <V> V |
getSelectedElement(org.eclipse.core.commands.ExecutionEvent event,
Class<V> type)
Get the selected element of type V.
|
static <V> List<V> |
getSelectedElements(org.eclipse.core.commands.ExecutionEvent event,
Class<V> type)
Get a list of selected elements of type V.
|
static <E extends org.eclipse.ui.IEditorPart> |
openEditor(org.eclipse.core.commands.ExecutionEvent event,
String editorId,
org.eclipse.ui.IEditorInput editorInput)
Open an editor from within a handler.
|
static <V extends org.eclipse.ui.IViewPart> |
showView(org.eclipse.core.commands.ExecutionEvent event,
String viewId)
Show a view from within a handler.
|
public static <V> V getSelectedElement(org.eclipse.core.commands.ExecutionEvent event, Class<V> type)
public static <V> List<V> getSelectedElements(org.eclipse.core.commands.ExecutionEvent event, Class<V> type)
public static org.eclipse.ui.IWorkbenchPage getActivePage(org.eclipse.core.commands.ExecutionEvent event)
public static <E extends org.eclipse.ui.IEditorPart> E openEditor(org.eclipse.core.commands.ExecutionEvent event, String editorId, org.eclipse.ui.IEditorInput editorInput) throws org.eclipse.ui.PartInitException
org.eclipse.ui.PartInitException
public static <V extends org.eclipse.ui.IViewPart> V showView(org.eclipse.core.commands.ExecutionEvent event, String viewId) throws org.eclipse.ui.PartInitException
org.eclipse.ui.PartInitException
Copyright © 2020. All rights reserved.