Class Workbench

All Implemented Interfaces:
IAdaptable, IWorkbench, IWorkbench, IServiceLocator

public final class Workbench extends EventManager implements IWorkbench, IWorkbench
The workbench class represents the top of the Eclipse user interface. Its primary responsibility is the management of workbench windows, dialogs, wizards, and other workbench-related windows.

Note that any code that is run during the creation of a workbench instance should not required access to the display.

  • Field Details

  • Method Details

    • getInstance

      public static Workbench getInstance()
      Returns the one and only instance of the workbench, if there is one.
      Returns:
      the workbench, or null if the workbench has not been created, or has been created and already completed
    • createAndRunWorkbench

      public static int createAndRunWorkbench(Display display, WorkbenchAdvisor advisor)
      Creates the workbench and associates it with the the given display and workbench advisor, and runs the workbench UI. This entails processing and dispatching events until the workbench is closed or restarted.

      This method is intended to be called by PlatformUI. Fails if the workbench UI has already been created.

      The display passed in must be the default display.

      Parameters:
      display - the display to be used for all UI interactions with the workbench
      advisor - the application-specific advisor that configures and specializes the workbench
      Returns:
      return code RETURN_OKfor normal exit; RETURN_RESTARTif the workbench was terminated with a call to IWorkbench.restart; other values reserved for future use
    • createDisplay

      public static Display createDisplay()
      Creates the Display to be used by the workbench.
      Returns:
      the display
    • getWorkbenchTestable

      public static org.eclipse.ui.internal.testing.WorkbenchTestable getWorkbenchTestable()
      Returns the testable object facade, for use by the test harness.
      Returns:
      the testable object facade
      Since:
      3.0
    • addWorkbenchListener

      public void addWorkbenchListener(IWorkbenchListener listener)
      Description copied from interface: IWorkbench
      Adds a workbench listener.
      Specified by:
      addWorkbenchListener in interface IWorkbench
      Parameters:
      listener - the workbench listener to add
    • removeWorkbenchListener

      public void removeWorkbenchListener(IWorkbenchListener listener)
      Description copied from interface: IWorkbench
      Removes a workbench listener.
      Specified by:
      removeWorkbenchListener in interface IWorkbench
      Parameters:
      listener - the workbench listener to remove
    • addWindowListener

      public void addWindowListener(IWindowListener l)
      Description copied from interface: IWorkbench
      Adds a window listener.
      Specified by:
      addWindowListener in interface IWorkbench
      Parameters:
      l - the window listener to add
    • removeWindowListener

      public void removeWindowListener(IWindowListener l)
      Description copied from interface: IWorkbench
      Removes a window listener.
      Specified by:
      removeWindowListener in interface IWorkbench
      Parameters:
      l - the window listener to remove
    • fireWindowOpened

      protected void fireWindowOpened(IWorkbenchWindow window)
      Fire window opened event.
      Parameters:
      window - The window which just opened; should not be null.
    • fireWindowClosed

      protected void fireWindowClosed(IWorkbenchWindow window)
      Fire window closed event.
      Parameters:
      window - The window which just closed; should not be null.
    • fireWindowActivated

      protected void fireWindowActivated(IWorkbenchWindow window)
      Fire window activated event.
      Parameters:
      window - The window which was just activated; should not be null.
    • fireWindowDeactivated

      protected void fireWindowDeactivated(IWorkbenchWindow window)
      Fire window deactivated event.
      Parameters:
      window - The window which was just deactivated; should not be null.
    • saveAllEditors

      public boolean saveAllEditors(boolean confirm)
      Description copied from interface: IWorkbench
      Save all dirty editors in the workbench. Opens a dialog to prompt the user if confirm is true. Return true if successful. Return false if the user has canceled the command.
      Specified by:
      saveAllEditors in interface IWorkbench
      Parameters:
      confirm - true to ask the user before saving unsaved changes (recommended), and false to save unsaved changes without asking
      Returns:
      true if the command succeeded, and false if the operation was canceled by the user or an error occurred while saving
    • close

      public boolean close()
      Description copied from interface: IWorkbench
      Closes this workbench and all its open windows.

      If the workbench has an open editor with unsaved content, the user will be given the opportunity to save it.

      Specified by:
      close in interface IWorkbench
      Specified by:
      close in interface IWorkbench
      Returns:
      true if the workbench was successfully closed, and false if it is still open
    • getActiveWorkbenchWindow

      public IWorkbenchWindow getActiveWorkbenchWindow()
      Description copied from interface: IWorkbench
      Returns the currently active window for this workbench (if any). Returns null if there is no active workbench window. Returns null if called from a non-UI thread.

      In the special case when there's no active workbench window and a workbench window is under construction this workbench window instance is returned.

      Specified by:
      getActiveWorkbenchWindow in interface IWorkbench
      Returns:
      the active workbench window, or null if there is no active workbench window or if called from a non-UI thread
    • getEditorHistory

      public EditorHistory getEditorHistory()
    • getEditorRegistry

      public IEditorRegistry getEditorRegistry()
      Description copied from interface: IWorkbench
      Returns the editor registry for the workbench.
      Specified by:
      getEditorRegistry in interface IWorkbench
      Returns:
      the workbench editor registry
    • getOperationSupport

      public IWorkbenchOperationSupport getOperationSupport()
      Description copied from interface: IWorkbench

      Returns the undoable operation support for the workbench.

      Specified by:
      getOperationSupport in interface IWorkbench
      Returns:
      the workbench operation support
    • getPerspectiveRegistry

      public IPerspectiveRegistry getPerspectiveRegistry()
      Description copied from interface: IWorkbench
      Returns the perspective registry for the workbench.
      Specified by:
      getPerspectiveRegistry in interface IWorkbench
      Returns:
      the workbench perspective registry
    • getPreferenceManager

      public PreferenceManager getPreferenceManager()
      Description copied from interface: IWorkbench
      Returns the preference manager for the workbench.
      Specified by:
      getPreferenceManager in interface IWorkbench
      Returns:
      the workbench preference manager
    • getPreferenceStore

      public IPreferenceStore getPreferenceStore()
      Description copied from interface: IWorkbench
      Returns the preference store for the workbench.
      Specified by:
      getPreferenceStore in interface IWorkbench
      Returns:
      the workbench preference store
    • getSharedImages

      public ISharedImages getSharedImages()
      Description copied from interface: IWorkbench
      Returns the shared images for the workbench.
      Specified by:
      getSharedImages in interface IWorkbench
      Returns:
      the shared image manager
    • getWorkbenchWindowCount

      public int getWorkbenchWindowCount()
      Description copied from interface: IWorkbench
      Returns the number of open main windows associated with this workbench. Note that wizards and dialogs are not included in this list since they are not considered main windows.
      Specified by:
      getWorkbenchWindowCount in interface IWorkbench
      Returns:
      the number of open windows
    • getWorkbenchWindows

      public IWorkbenchWindow[] getWorkbenchWindows()
      Description copied from interface: IWorkbench
      Returns a list of the open main windows associated with this workbench. Note that wizards and dialogs are not included in this list since they are not considered main windows.
      Specified by:
      getWorkbenchWindows in interface IWorkbench
      Returns:
      a list of open windows
    • getWorkingSetManager

      public IWorkingSetManager getWorkingSetManager()
      Description copied from interface: IWorkbench
      Returns the working set manager for the workbench.
      Specified by:
      getWorkingSetManager in interface IWorkbench
      Returns:
      the working set manager
    • createLocalWorkingSetManager

      public ILocalWorkingSetManager createLocalWorkingSetManager()
      Description copied from interface: IWorkbench
      Creates a new local working set manager. Clients of local working set managers are responsible for calling IWorkingSetManager.dispose() when the working sets it manages are no longer needed.
      Specified by:
      createLocalWorkingSetManager in interface IWorkbench
      Returns:
      the local working set manager
    • isClosing

      public boolean isClosing()
      Description copied from interface: IWorkbench
      Returns a boolean indicating whether the workbench is in the process of closing.
      Specified by:
      isClosing in interface IWorkbench
      Returns:
      true if the workbench is in the process of closing, false otherwise
    • getBindingContext

      public MBindingContext getBindingContext(String id)
    • isStarting

      public boolean isStarting()
      Returns true if the Workbench is in the process of starting.
      Specified by:
      isStarting in interface IWorkbench
      Returns:
      true if the Workbench is starting, but not yet running the event loop.
    • openWorkbenchWindow

      public IWorkbenchWindow openWorkbenchWindow(IAdaptable input) throws WorkbenchException
      Description copied from interface: IWorkbench
      Creates and opens a new workbench window with one page. The perspective of the new page is defined by the default perspective ID. The new window and new page become active.

      Note: The caller is responsible to ensure the action using this method will explicitly inform the user a new window will be opened. Otherwise, callers are strongly recommended to use the openPerspective APIs to programmatically show a perspective to avoid confusing the user.

      Specified by:
      openWorkbenchWindow in interface IWorkbench
      Parameters:
      input - the page input, or null if there is no current input. This is used to seed the input for the new page's views.
      Returns:
      the new workbench window
      Throws:
      WorkbenchException - if a new window and page could not be opened
      See Also:
    • openWorkbenchWindow

      public IWorkbenchWindow openWorkbenchWindow(String perspectiveId, IAdaptable input) throws WorkbenchException
      Description copied from interface: IWorkbench
      Creates and opens a new workbench window with one page. The perspective of the new page is defined by the specified perspective ID. The new window and new page become active.

      Note: The caller is responsible to ensure the action using this method will explicitly inform the user a new window will be opened. Otherwise, callers are strongly recommended to use the openPerspective APIs to programmatically show a perspective to avoid confusing the user.

      In most cases where this method is used the caller is tightly coupled to a particular perspective. They define it in the registry and contribute some user interface action to open or activate it. In situations like this a static variable is often used to identify the perspective ID.

      Specified by:
      openWorkbenchWindow in interface IWorkbench
      Parameters:
      perspectiveId - the perspective id for the window's initial page, or null for no initial page
      input - the page input, or null if there is no current input. This is used to seed the input for the new page's views.
      Returns:
      the new workbench window
      Throws:
      WorkbenchException - if a new window and page could not be opened
      See Also:
    • openWorkbenchWindow

      public WorkbenchWindow openWorkbenchWindow(IAdaptable input, IPerspectiveDescriptor descriptor, MWindow window, boolean newWindow)
    • restart

      public boolean restart()
      Description copied from interface: IWorkbench
      Closes then restarts the workbench with the same command line as used for the previous launch.

      If the workbench has an open editor with unsaved content, the user will be given the opportunity to save it.

      Specified by:
      restart in interface IWorkbench
      Specified by:
      restart in interface IWorkbench
      Returns:
      true if the workbench was successfully closed, and false if it could not be closed
    • restart

      public boolean restart(boolean useCurrrentWorkspace)
      Description copied from interface: IWorkbench
      Closes then restarts this workbench using the current workspace if useCurrentWorkspace is true. Otherwise, works as IWorkbench.restart().

      If the workbench has an open editor with unsaved content, the user will be given the opportunity to save it.

      Specified by:
      restart in interface IWorkbench
      Parameters:
      useCurrrentWorkspace - true to use the current workspace while restarting this workbench, and false to restart the workbench with the same command line as used for the previous launch
      Returns:
      true if the workbench was successfully closed, and false if it could not be closed
    • setRestartArguments

      public static Object setRestartArguments(String workspacePath)
      Sets the arguments required to restart the workbench using the specified path as the workspace location.
      Parameters:
      workspacePath - the new workspace location
      Returns:
      IApplication.EXIT_OK or IApplication.EXIT_RELAUNCH
    • getEarlyActivatedPlugins

      public ContributionInfo[] getEarlyActivatedPlugins()
      Returns the ids of all plug-ins that extend the org.eclipse.ui.startup extension point.
      Returns:
      the ids of all plug-ins containing 1 or more startup extensions
    • getDisabledEarlyActivatedPlugins

      public String[] getDisabledEarlyActivatedPlugins()
      Returns the ids of the early activated plug-ins that have been disabled by the user.
      Returns:
      the ids of the early activated plug-ins that have been disabled by the user
    • setEnableAutoSave

      public void setEnableAutoSave(boolean b)
      Disable the Workbench Auto-Save job on startup during tests.
      Parameters:
      b - false to disable the tests.
    • showPerspective

      public IWorkbenchPage showPerspective(String perspectiveId, IWorkbenchWindow window) throws WorkbenchException
      Description copied from interface: IWorkbench
      Shows the specified perspective to the user. The caller should use this method when the perspective to be shown is not dependent on the page's input. That is, the perspective can open in any page depending on user preferences.

      The perspective may be shown in the specified window, in another existing window, or in a new window depending on user preferences. The exact policy is controlled by the workbench to ensure consistency to the user. The policy is subject to change. The current policy is as follows:

      • If the specified window has the requested perspective open, then the window is given focus and the perspective is shown. The page's input is ignored.
      • If another window that has the workspace root as input and the requested perspective open and active, then the window is given focus.
      • Otherwise the requested perspective is opened and shown in the specified window or in a new window depending on the current user preference for opening perspectives, and that window is given focus.

      The workbench also defines a number of menu items to activate or open each registered perspective. A complete list of these perspectives is available from the perspective registry found on IWorkbench.

      Specified by:
      showPerspective in interface IWorkbench
      Parameters:
      perspectiveId - the perspective ID to show
      window - the workbench window of the action calling this method.
      Returns:
      the workbench page that the perspective was shown
      Throws:
      WorkbenchException - if the perspective could not be shown
    • showPerspective

      public IWorkbenchPage showPerspective(String perspectiveId, IWorkbenchWindow targetWindow, IAdaptable input) throws WorkbenchException
      Description copied from interface: IWorkbench
      Shows the specified perspective to the user. The caller should use this method when the perspective to be shown is dependent on the page's input. That is, the perspective can only open in any page with the specified input.

      The perspective may be shown in the specified window, in another existing window, or in a new window depending on user preferences. The exact policy is controlled by the workbench to ensure consistency to the user. The policy is subject to change. The current policy is as follows:

      • If the specified window has the requested perspective open and the same requested input, then the window is given focus and the perspective is shown.
      • If another window has the requested input and the requested perspective open and active, then that window is given focus.
      • If the specified window has the same requested input but not the requested perspective, then the window is given focus and the perspective is opened and shown on condition that the user preference is not to open perspectives in a new window.
      • Otherwise the requested perspective is opened and shown in a new window, and the window is given focus.

      The workbench also defines a number of menu items to activate or open each registered perspective. A complete list of these perspectives is available from the perspective registry found on IWorkbench.

      Specified by:
      showPerspective in interface IWorkbench
      Parameters:
      perspectiveId - the perspective ID to show
      targetWindow - the workbench window of the action calling this method.
      input - the page input, or null if there is no current input. This is used to seed the input for the page's views
      Returns:
      the workbench page that the perspective was shown
      Throws:
      WorkbenchException - if the perspective could not be shown
    • getDecoratorManager

      public IDecoratorManager getDecoratorManager()
      Description copied from interface: IWorkbench
      Returns the decorator manager.

      Any client using the decorator manager should come up with the text and image for the element (including any of the part's own decorations) before calling the decorator manager. It should also add a listener to be notified when decorations change.

      Note that if the element implements IAdaptable, decorators may use this mechanism to obtain an adapter (for example an IResource), and derive the decoration from the adapter rather than the element. Since the adapter may differ from the original element, those using the decorator manager should be prepared to handle notification that the decoration for the adapter has changed, in addition to handling notification that the decoration for the element has changed. That is, it needs to be able to map back from the adapter to the element.

      Specified by:
      getDecoratorManager in interface IWorkbench
      Returns:
      the decorator manager
    • getDisplay

      public Display getDisplay()
      Description copied from interface: IWorkbench
      Returns the display for this workbench.

      Code should always ask the workbench for the display rather than rely on Display.getDefault().

      Specified by:
      getDisplay in interface IWorkbench
      Returns:
      the display to be used for all UI interactions with this workbench
    • getDefaultPerspectiveId

      public String getDefaultPerspectiveId()
      Returns the default perspective id, which may be null.
      Returns:
      the default perspective id, or null
    • getDefaultPageInput

      public IAdaptable getDefaultPageInput()
      Returns the default workbench window page input.
      Returns:
      the default window page input or null if none
    • getMainPreferencePageId

      public String getMainPreferencePageId()
      Returns the id of the preference page that should be presented most prominently.
      Returns:
      the id of the preference page, or null if none
    • getElementFactory

      public IElementFactory getElementFactory(String factoryId)
      Description copied from interface: IWorkbench
      Returns the element factory with the given id.
      Specified by:
      getElementFactory in interface IWorkbench
      Parameters:
      factoryId - the id of the element factory
      Returns:
      the element factory, or null if none
      See Also:
    • getProgressService

      public IProgressService getProgressService()
      Description copied from interface: IWorkbench
      Returns the progress service for the workbench.
      Specified by:
      getProgressService in interface IWorkbench
      Returns:
      the progress service
    • getActivitySupport

      public IWorkbenchActivitySupport getActivitySupport()
      Description copied from interface: IWorkbench
      Returns an interface to manage activities at the workbench level.
      Specified by:
      getActivitySupport in interface IWorkbench
      Returns:
      an interface to manage activities at the workbench level. Guaranteed not to be null.
    • getContextSupport

      public IWorkbenchContextSupport getContextSupport()
      Description copied from interface: IWorkbench
      Returns an interface to manage contexts at the workbench level.
      Specified by:
      getContextSupport in interface IWorkbench
      Returns:
      an interface to manage contexts at the workbench level. Guaranteed not to be null.
      See Also:
    • getIntroManager

      public IIntroManager getIntroManager()
      Description copied from interface: IWorkbench
      Return the intro manager for this workbench.
      Specified by:
      getIntroManager in interface IWorkbench
      Returns:
      the intro manager for this workbench. Guaranteed not to be null.
    • getIntroDescriptor

      public org.eclipse.ui.internal.intro.IntroDescriptor getIntroDescriptor()
      Returns:
      the intro extension for this workbench.
      Since:
      3.0
    • setIntroDescriptor

      public void setIntroDescriptor(org.eclipse.ui.internal.intro.IntroDescriptor descriptor)
      This method exists as a test hook. This method should NEVER be called by clients.
      Parameters:
      descriptor - The intro descriptor to use.
      Since:
      3.0
    • getThemeManager

      public IThemeManager getThemeManager()
      Description copied from interface: IWorkbench
      Return the theme manager for this workbench.
      Specified by:
      getThemeManager in interface IWorkbench
      Returns:
      the theme manager for this workbench.Guaranteed not to be null.
    • isRunning

      public boolean isRunning()
      Returns true if the workbench is running, false if it has been terminated.
      Returns:
      true if the workbench is running, false if it has been terminated.
    • largeUpdateStart

      public void largeUpdateStart()

      Indicates the start of a large update within the workbench. This is used to disable CPU-intensive, change-sensitive services that were temporarily disabled in the midst of large changes. This method should always be called in tandem with largeUpdateEnd, and the event loop should not be allowed to spin before that method is called.

      Important: always use with largeUpdateEnd!

    • largeUpdateEnd

      public void largeUpdateEnd()

      Indicates the end of a large update within the workbench. This is used to re-enable services that were temporarily disabled in the midst of large changes. This method should always be called in tandem with largeUpdateStart, and the event loop should not be allowed to spin before this method is called.

      Important: always protect this call by using finally!

    • getExtensionTracker

      public IExtensionTracker getExtensionTracker()
      Description copied from interface: IWorkbench

      Return the extension tracker for the workbench. This tracker may be used by plug-ins to ensure responsiveness to changes to the plug-in registry.

      The tracker at this level of the workbench is typically used to track elements that persist for the life of the workbench. For example, IEditorDescriptor objects fall into this category.

      Specified by:
      getExtensionTracker in interface IWorkbench
      Returns:
      the extension tracker
      See Also:
    • getHelpSystem

      public IWorkbenchHelpSystem getHelpSystem()
      Description copied from interface: IWorkbench
      Return the help system for this workbench.
      Specified by:
      getHelpSystem in interface IWorkbench
      Returns:
      the help system
    • getBrowserSupport

      public IWorkbenchBrowserSupport getBrowserSupport()
      Description copied from interface: IWorkbench
      Return the browser support for this workbench.
      Specified by:
      getBrowserSupport in interface IWorkbench
      Returns:
      the browser support system
    • getViewRegistry

      public IViewRegistry getViewRegistry()
      Description copied from interface: IWorkbench
      Returns the view registry for the workbench.
      Specified by:
      getViewRegistry in interface IWorkbench
      Returns:
      the workbench view registry
    • getNewWizardRegistry

      public IWizardRegistry getNewWizardRegistry()
      Description copied from interface: IWorkbench
      Return the new wizard registry.
      Specified by:
      getNewWizardRegistry in interface IWorkbench
      Returns:
      the new wizard registry
    • getImportWizardRegistry

      public IWizardRegistry getImportWizardRegistry()
      Description copied from interface: IWorkbench
      Return the import wizard registry.
      Specified by:
      getImportWizardRegistry in interface IWorkbench
      Returns:
      the import wizard registry
    • getExportWizardRegistry

      public IWizardRegistry getExportWizardRegistry()
      Description copied from interface: IWorkbench
      Return the export wizard registry.
      Specified by:
      getExportWizardRegistry in interface IWorkbench
      Returns:
      the export wizard registry
    • getAdapter

      public <T> T getAdapter(Class<T> key)
      Description copied from interface: IAdaptable
      Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

      Clients may implement this method but should generally call Adapters.adapt(Object, Class, boolean) rather than invoking it directly.

      Specified by:
      getAdapter in interface IAdaptable
      Type Parameters:
      T - the class type
      Parameters:
      key - the adapter class to look up
      Returns:
      a object of the given class, or null if this object does not have an adapter for the given class
    • getService

      public <T> T getService(Class<T> key)
      Description copied from interface: IServiceLocator
      Retrieves the service corresponding to the given API.
      Specified by:
      getService in interface IServiceLocator
      Parameters:
      key - This is the interface that the service implements. Must not be null.
      Returns:
      The service, or null if no such service could be found.
    • hasService

      public boolean hasService(Class<?> key)
      Description copied from interface: IServiceLocator
      Whether this service exists within the scope of this service locator. This does not include looking for the service within the scope of the parents. This method can be used to determine whether a particular service supports nesting in this scope.
      Specified by:
      hasService in interface IServiceLocator
      Parameters:
      key - This is the interface that the service implements. Must not be null.
      Returns:
      true if the service locator can find a service for the given API; false otherwise.
    • registerService

      public void registerService(Class api, Object service)
      Registers a service with this locator. If there is an existing service matching the same api and it implements IDisposable, it will be disposed.
      Parameters:
      api - This is the interface that the service implements. Must not be null.
      service - The service to register. This must be some implementation of api. This value must not be null.
    • addShowingMenus

      public void addShowingMenus(Set menuIds, ISelection localSelection, ISelection localEditorInput)
      Adds the ids of a menu that is now showing to the menu source provider. This is used for legacy action-based handlers which need to become active only for the duration of a menu being visible.
      Parameters:
      menuIds - The identifiers of the menu that is now showing; must not be null.
    • removeShowingMenus

      public void removeShowingMenus(Set menuIds, ISelection localSelection, ISelection localEditorInput)
      Removes the ids of a menu that is now hidden from the menu source provider. This is used for legacy action-based handlers which need to become active only for the duration of a menu being visible.
      Parameters:
      menuIds - The identifiers of the menu that is now hidden; must not be null.
    • saveAll

      public boolean saveAll(IShellProvider shellProvider, IRunnableContext runnableContext, ISaveableFilter filter, boolean confirm)
      Description copied from interface: IWorkbench
      Save all dirty saveables in the workbench that match the given filter. Opens a dialog to prompt the user if confirm is true. Return true if successful. Return false if the user has canceled the command.
      Specified by:
      saveAll in interface IWorkbench
      Parameters:
      shellProvider - the provider used to obtain a shell in prompting is required. Clients can use a workbench window for this.
      runnableContext - a runnable context that will be used to provide a progress monitor while the save is taking place. Clients can use a workbench window for this.
      filter - the filter used to determine if a particular dirty saveable needs to be saved or null if all dirty saveables should be saved.
      confirm - true to ask the user before saving unsaved changes (recommended), and false to save unsaved changes without asking
      Returns:
      true if the command succeeded, and false if the operation was canceled by the user or an error occurred while saving
    • getModalDialogShellProvider

      public IShellProvider getModalDialogShellProvider()
      Description copied from interface: IWorkbench
      Return a shell provider that can be used to get the best parenting possible for a modal dialog. If modal shells are already created, use the topmost modal shell as the parent to avoid two modal dialogs. If there are no modal shells, use the shell of the active workbench window.
      Specified by:
      getModalDialogShellProvider in interface IWorkbench
      Returns:
      a shell provider that provides the best parenting possible for a modal dialog.
    • getContext

      public IEclipseContext getContext()
    • getApplication

      public MApplication getApplication()
      Specified by:
      getApplication in interface IWorkbench
      Returns:
      the application model driving the workbench
    • getId

      public String getId()
      Specified by:
      getId in interface IWorkbench
      Returns:
      unique id of the instance
    • createId

      protected String createId()