Class EditorActionBuilder.ExternalContributor

All Implemented Interfaces:
Enclosing class:

public static class EditorActionBuilder.ExternalContributor extends Object implements IEditorActionBarContributor
Helper class that will populate the menu and toolbar with the external editor contributions.
  • Constructor Details

    • ExternalContributor

      public ExternalContributor(ArrayList<Object> cache)
  • Method Details

    • dispose

      public void dispose()
      Description copied from interface: IEditorActionBarContributor
      Disposes this contributor.
      Specified by:
      dispose in interface IEditorActionBarContributor
    • getExtendedActions

      public ActionDescriptor[] getExtendedActions()
    • init

      public void init(IActionBars bars, IWorkbenchPage page)
      Description copied from interface: IEditorActionBarContributor
      Initializes this contributor, which is expected to add contributions as required to the given action bars and global action handlers.

      The page is passed to support the use of RetargetAction by the contributor. In this case the init method implementors should:

      1. set retarget actions as global action handlers
      2. add the retarget actions as part listeners
      3. get the active part and if not null call partActivated on the retarget actions

      And in the dispose method the retarget actions should be removed as part listeners.

      Specified by:
      init in interface IEditorActionBarContributor
      bars - the action bars
      page - the workbench page for this contributor
    • setActiveEditor

      public void setActiveEditor(IEditorPart editor)
      Description copied from interface: IEditorActionBarContributor
      Sets the active editor for the contributor. Implementors should disconnect from the old editor, connect to the new editor, and update the actions to reflect the new editor.
      Specified by:
      setActiveEditor in interface IEditorActionBarContributor
      editor - the new editor target