Class SelectionContextObject
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.services.ui.SelectionContextObject
-
public final class SelectionContextObject extends Object
Utility method to retrieve context object from the given selection.- Restriction:
- This class is not intended to be sub-classed by clients.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IApplication
getContextApplication(ISelection selection)
Retrieve current selection context application.static org.eclipse.emf.ecore.EObject
getContextObject(ISelection selection)
Retrieve current selection context object.static org.eclipse.emf.ecore.EObject
getContextObject(org.eclipse.ui.IEditorPart editorpart)
Retrieve current editor part context object.static org.eclipse.emf.ecore.EObject
getContextObject(org.eclipse.ui.IWorkbenchPage page)
Retrieve current workbench page context object.
-
-
-
Method Detail
-
getContextObject
public static org.eclipse.emf.ecore.EObject getContextObject(org.eclipse.ui.IWorkbenchPage page)
Retrieve current workbench page context object. Can returnnull
, if cannot retrieve.- Parameters:
page
- the workbench page to retrieve object from, cannot benull
- Returns:
- current workbench page context object or
null
if cannot retrieve
-
getContextObject
public static org.eclipse.emf.ecore.EObject getContextObject(ISelection selection)
Retrieve current selection context object. Can returnnull
, if cannot retrieve.- Parameters:
selection
- the selection to retrieve object from, if given selection isnull
, method will returnnull
- Returns:
- current selection context object or
null
if cannot retrieve
-
getContextObject
public static org.eclipse.emf.ecore.EObject getContextObject(org.eclipse.ui.IEditorPart editorpart)
Retrieve current editor part context object. Can returnnull
if cannot retrieve.- Parameters:
editorpart
- the editor part to retrieve object from, cannot benull
- Returns:
- current editor context object or
null
if cannot retrieve
-
getContextApplication
public static IApplication getContextApplication(ISelection selection)
Retrieve current selection context application. Can returnnull
, if cannot retrieve.- Parameters:
selection
- the selection to retrieve application from, if given selection isnull
, method will returnnull
- Returns:
- current selection context application or
null
if cannot retrieve
-
-