Class PluginActionBuilder

java.lang.Object
org.eclipse.ui.internal.registry.RegistryReader
org.eclipse.ui.internal.PluginActionBuilder
Direct Known Subclasses:
EditorActionBuilder, ObjectActionContributor, PluginActionSetBuilder, ViewActionBuilder, ViewerActionBuilder

public abstract class PluginActionBuilder extends org.eclipse.ui.internal.registry.RegistryReader
This class contains shared functionality for reading action contributions from plugins into workbench parts (both editors and views).
  • Field Details

  • Constructor Details

    • PluginActionBuilder

      public PluginActionBuilder()
      The default constructor.
  • Method Details

    • contribute

      public final void contribute(IMenuManager menu, IToolBarManager toolbar, boolean appendIfMissing)
      Contributes submenus and/or actions into the provided menu and tool bar managers.
      Parameters:
      menu - the menu to contribute to
      toolbar - the toolbar to contribute to
      appendIfMissing - append containers if missing
    • createActionDescriptor

      protected abstract ActionDescriptor createActionDescriptor(IConfigurationElement element)
      This factory method returns a new ActionDescriptor for the configuration element. It should be implemented by subclasses.
    • createContribution

      protected PluginActionBuilder.BasicContribution createContribution()
      Factory method to create the helper contribution class that will hold onto the menus and actions contributed.
    • getTargetID

      protected String getTargetID(IConfigurationElement element)
      Returns the name of the part ID attribute that is expected in the target extension.
    • getID

      protected String getID(IConfigurationElement element)
      Returns the id of this contributions.
    • readContributions

      protected void readContributions(String id, String tag, String extensionPoint)
      Reads the contributions from the registry for the provided workbench part and the provided extension point ID.
    • readElement

      protected boolean readElement(IConfigurationElement element)
      Implements abstract method to handle the provided XML element in the registry.
      Specified by:
      readElement in class org.eclipse.ui.internal.registry.RegistryReader
      Returns:
      true if element was recognized, false if not.
    • setAllowIdeLogging

      public static void setAllowIdeLogging(boolean b)
      If set to false, some of the logs that can be caused by use IDE plugins from an RCP app will be ignored.
      Parameters:
      b - Log the errors or not.
      Since:
      3.3