Class EditorSite

java.lang.Object
org.eclipse.ui.internal.PartSite
org.eclipse.ui.internal.EditorSite
All Implemented Interfaces:
IAdaptable, IShellProvider, IEditorSite, IWorkbenchPartSite, IWorkbenchSite, IServiceLocator

public class EditorSite extends PartSite implements IEditorSite
An editor container manages the services for an editor.
  • Constructor Details

  • Method Details

    • setActionBars

      public void setActionBars(SubActionBars bars)
      Description copied from class: PartSite
      Sets the action bars for the part.
      Overrides:
      setActionBars in class PartSite
    • activateActionBars

      public void activateActionBars(boolean forceVisibility)
      Overrides:
      activateActionBars in class PartSite
    • deactivateActionBars

      public void deactivateActionBars(boolean forceHide)
      Overrides:
      deactivateActionBars in class PartSite
    • getActionBarContributor

      public IEditorActionBarContributor getActionBarContributor()
      Returns the editor action bar contributor for this editor.

      An action contributor is responsable for the creation of actions. By design, this contributor is used for one or more editors of the same type. Thus, the contributor returned by this method is not owned completely by the editor. It is shared.

      Specified by:
      getActionBarContributor in interface IEditorSite
      Returns:
      the editor action bar contributor
    • getExtensionActionBarContributor

      public IEditorActionBarContributor getExtensionActionBarContributor()
      Returns the extension editor action bar contributor for this editor.
    • getEditorPart

      public IEditorPart getEditorPart()
      Returns the editor
    • getInitialScopeId

      protected String getInitialScopeId()
      Overrides:
      getInitialScopeId in class PartSite
    • dispose

      public void dispose()
      Description copied from class: PartSite
      Dispose the contributions.
      Overrides:
      dispose in class PartSite
    • registerContextMenu

      public final void registerContextMenu(MenuManager menuManager, ISelectionProvider selectionProvider, boolean includeEditorInput)
      Description copied from interface: IEditorSite

      Registers a pop-up menu with the default id for extension. The default id is defined as the part id.

      By default, context menus include object contributions based on the editor input for the current editor. It is possible to override this behaviour by calling this method with includeEditorInput as false. This might be desirable for editors that present a localized view of an editor input (e.g., a node in a model editor).

      For a detailed description of context menu registration see IWorkbenchPartSite.registerContextMenu(MenuManager, ISelectionProvider)

      Specified by:
      registerContextMenu in interface IEditorSite
      Parameters:
      menuManager - the menu manager; must not be null.
      selectionProvider - the selection provider; must not be null.
      includeEditorInput - Whether the editor input should be included when adding object contributions to this context menu.
      See Also:
    • registerContextMenu

      public final void registerContextMenu(String menuId, MenuManager menuManager, ISelectionProvider selectionProvider, boolean includeEditorInput)
      Description copied from interface: IEditorSite

      Registers a pop-up menu with a particular id for extension. This method should only be called if the target part has more than one context menu to register.

      By default, context menus include object contributions based on the editor input for the current editor. It is possible to override this behaviour by calling this method with includeEditorInput as false. This might be desirable for editors that present a localized view of an editor input (e.g., a node in a model editor).

      For a detailed description of context menu registration see IWorkbenchPartSite.registerContextMenu(MenuManager, ISelectionProvider)

      Specified by:
      registerContextMenu in interface IEditorSite
      Parameters:
      menuId - the menu id; must not be null.
      menuManager - the menu manager; must not be null.
      selectionProvider - the selection provider; must not be null.
      includeEditorInput - Whether the editor input should be included when adding object contributions to this context menu.
      See Also: