Package org.eclipse.ui.internal
Class InternalHandlerUtil
java.lang.Object
org.eclipse.ui.internal.InternalHandlerUtil
Some common utilities for working with handlers and IEvaluationContexts in
 Platform UI.
 
Note: this class should not be instantiated or extended by clients.
PROVISIONAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/UI team.
- Since:
- 3.3
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic CollectiongetActiveContexts(Object appContext) Return the active contexts.static IEditorPartgetActiveEditor(Object appContext) Return the active editor.static StringgetActiveEditorId(Object appContext) Return the part id of the active editor.static IWorkbenchPartgetActivePart(Object appContext) Return the active part.static StringgetActivePartId(Object appContext) Return the part id of the active part.static ShellgetActiveShell(Object appContext) Return the active shell.static IWorkbenchSitegetActiveSite(Object appContext) Return the active part site.static IWorkbenchWindowgetActiveWorkbenchWindow(Object appContext) Return the active workbench window.static ISelectiongetCurrentSelection(Object appContext) Return the current selection.static ObjectgetVariable(Object appContext, String name) Extract the variable.
- 
Constructor Details- 
InternalHandlerUtilpublic InternalHandlerUtil()
 
- 
- 
Method Details- 
getVariableExtract the variable.- Parameters:
- appContext- The application context
- name- The variable name to extract.
- Returns:
- The object from the application context, or nullif it could not be found.
 
- 
getActiveContextsReturn the active contexts.- Parameters:
- appContext- The execution appContext that contains the application context
- Returns:
- a collection of String contextIds, or null.
 
- 
getActiveShellReturn the active shell. Is not necessarily the active workbench window shell.- Parameters:
- appContext- The execution appContext that contains the application context
- Returns:
- the active shell, or null.
 
- 
getActiveWorkbenchWindowReturn the active workbench window.- Parameters:
- appContext- The execution appContext that contains the application context
- Returns:
- the active workbench window, or null.
 
- 
getActiveEditorReturn the active editor.- Parameters:
- appContext- The execution appContext that contains the application context
- Returns:
- the active editor, or null.
 
- 
getActiveEditorIdReturn the part id of the active editor.- Parameters:
- appContext- The execution appContext that contains the application context
- Returns:
- the part id of the active editor, or null.
 
- 
getActivePartReturn the active part.- Parameters:
- appContext- The execution appContext that contains the application context
- Returns:
- the active part, or null.
 
- 
getActivePartIdReturn the part id of the active part.- Parameters:
- appContext- The execution appContext that contains the application context
- Returns:
- the part id of the active part, or null.
 
- 
getActiveSiteReturn the active part site.- Parameters:
- appContext- The execution appContext that contains the application context
- Returns:
- the active part site, or null.
 
- 
getCurrentSelectionReturn the current selection.- Parameters:
- appContext- The execution appContext that contains the application context
- Returns:
- the current selection, or null.
 
 
-