Eclipse Platform
Kepler (4.3)

org.eclipse.debug.ui.actions
Class BreakpointTypesContribution

java.lang.Object
  extended by org.eclipse.jface.action.ContributionItem
      extended by org.eclipse.ui.actions.CompoundContributionItem
          extended by org.eclipse.debug.ui.actions.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 Summary
BreakpointTypesContribution()
           
 
Method Summary
protected  IContributionItem[] getContributionItems()
          Return a list of contributions items that will replace this item in the parent manager.
 void initialize(IServiceLocator serviceLocator)
          The service locator for this contribution.
 
Methods inherited from class org.eclipse.ui.actions.CompoundContributionItem
fill, isDirty, isDynamic, setParent
 
Methods inherited from class org.eclipse.jface.action.ContributionItem
dispose, fill, fill, fill, getId, getParent, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setVisible, toString, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BreakpointTypesContribution

public BreakpointTypesContribution()
Method Detail

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

Eclipse Platform
Kepler (4.3)

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2012. All rights reserved.