Class ProductLineConfigurationEditorContributor

  • All Implemented Interfaces:
    org.eclipse.ui.IEditorActionBarContributor

    public class ProductLineConfigurationEditorContributor
    extends org.eclipse.ui.part.MultiPageEditorActionBarContributor
    Manages the installation/deinstallation of global actions for multi-page editors. Responsible for the redirection of global actions to the active editor. Multi-page contributor replaces the contributors for the individual editors in the multi-page editor.
    Author:
    gewalt, freitag
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.eclipse.ui.IEditorPart activeEditorPart  
      private org.eclipse.jface.action.Action sampleAction  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void contributeToMenu​(org.eclipse.jface.action.IMenuManager manager)
      Contributes to the given menu.
      void contributeToToolBar​(org.eclipse.jface.action.IToolBarManager manager)
      Contributes to the given toolbar.
      private void createActions()
      Creates the actions.
      protected org.eclipse.jface.action.IAction getAction​(org.eclipse.ui.texteditor.ITextEditor editor, java.lang.String actionID)
      Returns the action registered with the given text editor.
      void setActivePage​(org.eclipse.ui.IEditorPart part)
      Sets the active page for the editor.
      • Methods inherited from class org.eclipse.ui.part.MultiPageEditorActionBarContributor

        setActiveEditor
      • Methods inherited from class org.eclipse.ui.part.EditorActionBarContributor

        contributeToCoolBar, contributeToStatusLine, dispose, getActionBars, getPage, init, init
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • activeEditorPart

        private org.eclipse.ui.IEditorPart activeEditorPart
      • sampleAction

        private org.eclipse.jface.action.Action sampleAction
    • Constructor Detail

      • ProductLineConfigurationEditorContributor

        public ProductLineConfigurationEditorContributor()
        Creates a multi-page contributor.
    • Method Detail

      • getAction

        protected org.eclipse.jface.action.IAction getAction​(org.eclipse.ui.texteditor.ITextEditor editor,
                                                             java.lang.String actionID)
        Returns the action registered with the given text editor.
        Parameters:
        editor - An editor which shall be able to execute the specified action
        actionID - An actionID for is installed at the specified editor.
        Returns:
        IAction or null if editor is null.
      • setActivePage

        public void setActivePage​(org.eclipse.ui.IEditorPart part)
        Sets the active page for the editor.
        Specified by:
        setActivePage in class org.eclipse.ui.part.MultiPageEditorActionBarContributor
        Parameters:
        part - the part to set
      • createActions

        private void createActions()
        Creates the actions.
      • contributeToMenu

        public void contributeToMenu​(org.eclipse.jface.action.IMenuManager manager)
        Contributes to the given menu.
        Overrides:
        contributeToMenu in class org.eclipse.ui.part.EditorActionBarContributor
        Parameters:
        manager - that controls the menu
      • contributeToToolBar

        public void contributeToToolBar​(org.eclipse.jface.action.IToolBarManager manager)
        Contributes to the given toolbar.
        Overrides:
        contributeToToolBar in class org.eclipse.ui.part.EditorActionBarContributor
        Parameters:
        manager - the manager that controls the toolbar