Package org.eclipse.debug.ui.actions
Interface IToggleBreakpointsTargetManager
-
public interface IToggleBreakpointsTargetManager
Organizes the toggle breakpoints target factories contributed through the extension point and keeps track of the toggle breakpoints target that the factories produce. The manager is accessed as a singleton through thegetDefault()
method.The adapter mechanism for obtaining a toggle breakpoints target is still supported through a specialized toggle target factory. Targets contributed through this mechanism are labeled as "Default" in the UI.
Clients should call
DebugUITools.getToggleBreakpointsTargetManager()
for an instance of this instance.- Since:
- 3.8
- See Also:
IToggleBreakpointsTargetFactory
,IToggleBreakpointsTarget
,IToggleBreakpointsTargetExtension
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChangedListener(IToggleBreakpointsTargetManagerListener listener)
Adds the given listener to the list of listeners notified when the preferred toggle breakpoints targets change.Set<String>
getEnabledToggleBreakpointsTargetIDs(IWorkbenchPart part, ISelection selection)
Returns the set ofString
IDs of toggle breakpoint targets, which are enabled for the given active part and selection.String
getPreferredToggleBreakpointsTargetID(IWorkbenchPart part, ISelection selection)
Returns the ID of the calculated preferred toggle breakpoints target for the given active part and selection.IToggleBreakpointsTarget
getToggleBreakpointsTarget(IWorkbenchPart part, ISelection selection)
Given the ID of toggle breakpoint target, this method will try to find the factory that creates it and return an instance of it.String
getToggleBreakpointsTargetDescription(String id)
Given the ID of a toggle breakpoints target, this method will try to find the factory that creates it and ask it for the description of it.String
getToggleBreakpointsTargetName(String id)
Given the ID of a toggle breakpoints target, this method will try to find the factory that creates it and ask it for the name of it.void
removeChangedListener(IToggleBreakpointsTargetManagerListener listener)
Removes the given listener from the list of listeners notified when the preferred toggle breakpoints targets change.
-
-
-
Method Detail
-
getEnabledToggleBreakpointsTargetIDs
Set<String> getEnabledToggleBreakpointsTargetIDs(IWorkbenchPart part, ISelection selection)
Returns the set ofString
IDs of toggle breakpoint targets, which are enabled for the given active part and selection. The IDs can be used to create theIToggleBreakpointsTarget
instance.- Parameters:
part
- active partselection
- active selection in part- Returns:
- Set of toggle target IDs or an empty set
-
getPreferredToggleBreakpointsTargetID
String getPreferredToggleBreakpointsTargetID(IWorkbenchPart part, ISelection selection)
Returns the ID of the calculated preferred toggle breakpoints target for the given active part and selection. The returned ID is chosen based on factory enablement, whether the target is a default one, and on user choice.- Parameters:
part
- active partselection
- active selection in part- Returns:
- The toggle target IDs or null if none.
-
getToggleBreakpointsTarget
IToggleBreakpointsTarget getToggleBreakpointsTarget(IWorkbenchPart part, ISelection selection)
Given the ID of toggle breakpoint target, this method will try to find the factory that creates it and return an instance of it.- Parameters:
part
- The workbench part in which toggle target is to be usedselection
- The active selection to use with toggle target- Returns:
- The instantiated target or null
-
getToggleBreakpointsTargetName
String getToggleBreakpointsTargetName(String id)
Given the ID of a toggle breakpoints target, this method will try to find the factory that creates it and ask it for the name of it.- Parameters:
id
- The ID of the requested toggle breakpoint target.- Returns:
- The name of the target.
-
getToggleBreakpointsTargetDescription
String getToggleBreakpointsTargetDescription(String id)
Given the ID of a toggle breakpoints target, this method will try to find the factory that creates it and ask it for the description of it.- Parameters:
id
- The ID of the requested toggle breakpoint target.- Returns:
- The description of the target or null.
-
addChangedListener
void addChangedListener(IToggleBreakpointsTargetManagerListener listener)
Adds the given listener to the list of listeners notified when the preferred toggle breakpoints targets change.- Parameters:
listener
- The listener to add.
-
removeChangedListener
void removeChangedListener(IToggleBreakpointsTargetManagerListener listener)
Removes the given listener from the list of listeners notified when the preferred toggle breakpoints targets change.- Parameters:
listener
- The listener to add.
-
-