Package org.eclipse.debug.ui.actions
Class BreakpointTypesContribution
- java.lang.Object
-
- org.eclipse.jface.action.ContributionItem
-
- org.eclipse.ui.actions.CompoundContributionItem
-
- 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 theorg.eclipse.ui.menus
extension point. The breakpoint types are calculated based on the toggle breakpoint target factories contributed through thetoggleBreakpointsTargetFactories
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
Constructors Constructor Description BreakpointTypesContribution()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
dispose, fill, isDirty, isDynamic, setParent
-
Methods inherited from class org.eclipse.jface.action.ContributionItem
fill, fill, fill, getId, getParent, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setVisible, toString, update, update
-
-
-
-
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 classCompoundContributionItem
- 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 interfaceIWorkbenchContribution
- Parameters:
serviceLocator
- the locator which services can be retrieved. Will not benull
-
-