Class BreakpointTypesContribution

All Implemented Interfaces:
IContributionItem, IWorkbenchContribution

public class BreakpointTypesContribution extends CompoundContributionItem implements IWorkbenchContribution
Breakpoint ruler pop-up action that creates a sub-menu to select the currently active breakpoint type. This menu contribution can be added to an editor with the org.eclipse.ui.menus extension point. The breakpoint types are calculated based on the toggle breakpoint target factories contributed through the toggleBreakpointsTargetFactories extension point.

Following is example plug-in XML used to contribute this action to an editor's vertical ruler context menu.

 <extension point="org.eclipse.ui.menus">
   <menuContribution
     locationURI="popup:#CEditorRulerContext?after=additions"
     id="example.RulerPopupActions">
       <menu\
         id="breakpointTypes"
         label="Toggle Breakpoint">
         <dynamic\
           id="example.rulerContextMenu.breakpointTypesAction">
           class="org.eclipse.debug.ui.actions.BreakpointTypesContribution"
         menubarPath="additions">/
       </menu>
   </menuContribution>
 

Clients may refer to this class in plug-in XML. This class is not intended to be sub-classed.

Since:
3.8
Restriction:
This class is not intended to be sub-classed by clients.
  • Constructor Details

    • BreakpointTypesContribution

      public BreakpointTypesContribution()
  • Method Details

    • getContributionItems

      protected IContributionItem[] getContributionItems()
      Description copied from class: CompoundContributionItem
      Return a list of contributions items that will replace this item in the parent manager. The list must contain new contribution items every call since the old ones will be disposed.
      Specified by:
      getContributionItems in class CompoundContributionItem
      Returns:
      an array list of items to display. Must not be null.
    • initialize

      public void initialize(IServiceLocator serviceLocator)
      Description copied from interface: IWorkbenchContribution
      The service locator for this contribution. It will potentially exist longer than the lifecycle of this specific contribution, so ContributionItems should remove themselves from any listeners or services in their dispose() calls.
      Specified by:
      initialize in interface IWorkbenchContribution
      Parameters:
      serviceLocator - the locator which services can be retrieved. Will not be null