Class SelectionContextProject
java.lang.Object
com._1c.g5.v8.dt.platform.services.ui.SelectionContextProject
Utility method to retrieve context project from the given selection.
- Restriction:
- This class is not intended to be sub-classed by clients.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.core.resources.IProjectgetContextProject(ISelection selection) Retrieve current selection context project.static org.eclipse.core.resources.IProjectgetContextProject(org.eclipse.ui.IEditorPart editorpart) Retrieve current editor part context project.static org.eclipse.core.resources.IProjectgetContextProject(org.eclipse.ui.IWorkbenchPage page) Retrieve current workbench page context project.
-
Method Details
-
getContextProject
public static org.eclipse.core.resources.IProject getContextProject(org.eclipse.ui.IWorkbenchPage page) Retrieve current workbench page context project. Can returnnull, if cannot retrieve.- Parameters:
page- the workbench page to retrieve project from, cannot benull- Returns:
- current workbench page context project or
nullif cannot retrieve
-
getContextProject
Retrieve current selection context project. Can returnnull, if cannot retrieve.- Parameters:
selection- the selection to retrieve project from, if given selection isnull, method will returnnull- Returns:
- current selection context project or
nullif cannot retrieve
-
getContextProject
public static org.eclipse.core.resources.IProject getContextProject(org.eclipse.ui.IEditorPart editorpart) Retrieve current editor part context project. Can returnnullif cannot retrieve.- Parameters:
editorpart- the editor part to retrieve project from, cannot benull- Returns:
- current editor context project or
nullif cannot retrieve
-