Class SelectionContextObject
java.lang.Object
com._1c.g5.v8.dt.platform.services.ui.SelectionContextObject
Utility method to retrieve context object from the given selection.
- Restriction:
- This class is not intended to be sub-classed by clients.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IApplicationgetContextApplication(ISelection selection) Retrieve current selection context application.static org.eclipse.emf.ecore.EObjectgetContextObject(ISelection selection) Retrieve current selection context object.static org.eclipse.emf.ecore.EObjectgetContextObject(org.eclipse.ui.IEditorPart editorpart) Retrieve current editor part context object.static org.eclipse.emf.ecore.EObjectgetContextObject(org.eclipse.ui.IWorkbenchPage page) Retrieve current workbench page context object.
-
Method Details
-
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
nullif cannot retrieve
-
getContextObject
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
nullif cannot retrieve
-
getContextObject
public static org.eclipse.emf.ecore.EObject getContextObject(org.eclipse.ui.IEditorPart editorpart) Retrieve current editor part context object. Can returnnullif cannot retrieve.- Parameters:
editorpart- the editor part to retrieve object from, cannot benull- Returns:
- current editor context object or
nullif cannot retrieve
-
getContextApplication
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
nullif cannot retrieve
-