Class WorkbenchService
- java.lang.Object
-
- org.eclipse.graphiti.ui.internal.services.impl.WorkbenchService
-
- All Implemented Interfaces:
IWorkbenchService
public class WorkbenchService extends java.lang.Object implements IWorkbenchService
-
-
Constructor Summary
Constructors Constructor Description WorkbenchService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.ui.IWorkbenchWindowgetActiveOrFirstWorkbenchWindow()org.eclipse.jface.action.IStatusLineManagergetActiveStatusLineManager()Method returns the currentStatusLineManager.org.eclipse.swt.widgets.ShellgetShell()Returns the shell of the active workbench window.IDiagramContaineropenDiagramEditor(Diagram diagram)Opens the given diagram in the diagram editor.IDiagramContaineropenDiagramEditor(Diagram diagram, java.lang.String providerId)Opens the given diagram in the diagram editor.IDiagramContaineropenDiagramEditor(Diagram diagram, java.lang.String providerId, java.lang.String editorId)Opens the given diagram in the diagram editor with the given id.
-
-
-
Method Detail
-
getActiveStatusLineManager
public org.eclipse.jface.action.IStatusLineManager getActiveStatusLineManager()
Description copied from interface:IWorkbenchServiceMethod returns the currentStatusLineManager. If no StatusLineManager is available, a new StatusLineManager will be created and returned. In most cases this will not have any effect and will not be able to display status info, but it makes null pointer checks when calling the method obsolete- Specified by:
getActiveStatusLineManagerin interfaceIWorkbenchService- Returns:
- the status line manager of the active part or a new one if there is no such part
-
getActiveOrFirstWorkbenchWindow
public org.eclipse.ui.IWorkbenchWindow getActiveOrFirstWorkbenchWindow()
- Specified by:
getActiveOrFirstWorkbenchWindowin interfaceIWorkbenchService- Returns:
- the active workbench window, or the first one if there is no active window
-
openDiagramEditor
public IDiagramContainer openDiagramEditor(Diagram diagram)
Opens the given diagram in the diagram editor.- Specified by:
openDiagramEditorin interfaceIWorkbenchService- Parameters:
diagram- which should be openeddomain-- Returns:
- the editor instance
-
openDiagramEditor
public IDiagramContainer openDiagramEditor(Diagram diagram, java.lang.String providerId)
Opens the given diagram in the diagram editor.- Specified by:
openDiagramEditorin interfaceIWorkbenchService- Parameters:
diagram- which should be openeddomain-providerId- the unique provider id of a diagram type provider which will be used by the editor.- Returns:
- the editor instance
-
openDiagramEditor
public IDiagramContainer openDiagramEditor(Diagram diagram, java.lang.String providerId, java.lang.String editorId)
Opens the given diagram in the diagram editor with the given id.- Specified by:
openDiagramEditorin interfaceIWorkbenchService- Parameters:
diagram- which should be openeddomain-providerId- the unique provider id of a diagram type provider which will be used by the editor.editorId- the unique Eclipse editor id of the diagram editor to open. This id must belong to a subclass ofIDiagramContainerUI.- Returns:
- the editor instance
- Since:
- 0.8.0
-
getShell
public org.eclipse.swt.widgets.Shell getShell()
Description copied from interface:IWorkbenchServiceReturns the shell of the active workbench window.- Specified by:
getShellin interfaceIWorkbenchService- Returns:
- the shell
-
-