diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionManager.java index b2a93c9d6fd..2f861a718e8 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionManager.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/breakpointactions/BreakpointActionManager.java @@ -85,6 +85,15 @@ public class BreakpointActionManager { getBreakpointActions().remove(action); } + public boolean breakpointHasActions(IBreakpoint breakpoint) { + if (breakpoint != null) { + IMarker marker = breakpoint.getMarker(); + String actionNames = marker.getAttribute(BREAKPOINT_ACTION_ATTRIBUTE, ""); //$NON-NLS-1$ + return actionNames.length() > 0; + } + return false; + } + public void executeActions(IBreakpoint breakpoint, IAdaptable context) { if (breakpoint != null) { diff --git a/debug/org.eclipse.cdt.debug.ui/icons/ovr16/actions_ovr.gif b/debug/org.eclipse.cdt.debug.ui/icons/ovr16/actions_ovr.gif new file mode 100644 index 00000000000..f460fd8ec31 Binary files /dev/null and b/debug/org.eclipse.cdt.debug.ui/icons/ovr16/actions_ovr.gif differ diff --git a/debug/org.eclipse.cdt.debug.ui/icons/ovr16/actions_ovr_disabled.gif b/debug/org.eclipse.cdt.debug.ui/icons/ovr16/actions_ovr_disabled.gif new file mode 100644 index 00000000000..63fae76d503 Binary files /dev/null and b/debug/org.eclipse.cdt.debug.ui/icons/ovr16/actions_ovr_disabled.gif differ diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java index 8f824d9a473..fc9f6343daf 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugImages.java @@ -56,6 +56,8 @@ public class CDebugImages { public static final String IMG_OVRS_BREAKPOINT_INSTALLED_DISABLED = NAME_PREFIX + "installed_ovr_disabled.gif"; //$NON-NLS-1$ public static final String IMG_OVRS_BREAKPOINT_CONDITIONAL = NAME_PREFIX + "conditional_ovr.gif"; //$NON-NLS-1$ public static final String IMG_OVRS_BREAKPOINT_CONDITIONAL_DISABLED = NAME_PREFIX + "conditional_ovr_disabled.gif"; //$NON-NLS-1$ + public static final String IMG_OVRS_BREAKPOINT_WITH_ACTIONS = NAME_PREFIX + "actions_ovr.gif"; //$NON-NLS-1$ + public static final String IMG_OVRS_BREAKPOINT_WITH_ACTIONS_DISABLED = NAME_PREFIX + "actions_ovr_disabled.gif"; //$NON-NLS-1$ public static final String IMG_OVRS_ADDRESS_BREAKPOINT = NAME_PREFIX + "address_ovr.gif"; //$NON-NLS-1$ public static final String IMG_OVRS_ADDRESS_BREAKPOINT_DISABLED = NAME_PREFIX + "address_ovr_disabled.gif"; //$NON-NLS-1$ public static final String IMG_OVRS_FUNCTION_BREAKPOINT = NAME_PREFIX + "function_ovr.gif"; //$NON-NLS-1$ @@ -140,6 +142,8 @@ public class CDebugImages { public static final ImageDescriptor DESC_OVRS_BREAKPOINT_INSTALLED_DISABLED = createManaged( T_OVR, IMG_OVRS_BREAKPOINT_INSTALLED_DISABLED ); public static final ImageDescriptor DESC_OVRS_BREAKPOINT_CONDITIONAL = createManaged( T_OVR, IMG_OVRS_BREAKPOINT_CONDITIONAL ); public static final ImageDescriptor DESC_OVRS_BREAKPOINT_CONDITIONAL_DISABLED = createManaged( T_OVR, IMG_OVRS_BREAKPOINT_CONDITIONAL_DISABLED ); + public static final ImageDescriptor DESC_OVRS_BREAKPOINT_WITH_ACTIONS = createManaged( T_OVR, IMG_OVRS_BREAKPOINT_WITH_ACTIONS ); + public static final ImageDescriptor DESC_OVRS_BREAKPOINT_WITH_ACTIONS_DISABLED = createManaged( T_OVR, IMG_OVRS_BREAKPOINT_WITH_ACTIONS_DISABLED ); public static final ImageDescriptor DESC_OVRS_ADDRESS_BREAKPOINT = createManaged( T_OVR, IMG_OVRS_ADDRESS_BREAKPOINT ); public static final ImageDescriptor DESC_OVRS_ADDRESS_BREAKPOINT_DISABLED = createManaged( T_OVR, IMG_OVRS_ADDRESS_BREAKPOINT_DISABLED ); public static final ImageDescriptor DESC_OVRS_FUNCTION_BREAKPOINT = createManaged( T_OVR, IMG_OVRS_FUNCTION_BREAKPOINT ); diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java index ce7d3ee8e34..0f7defcb913 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java @@ -17,6 +17,7 @@ import java.util.HashMap; import org.eclipse.cdt.core.IAddress; import org.eclipse.cdt.core.resources.FileStorage; +import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.cdt.debug.core.cdi.ICDIBreakpointHit; import org.eclipse.cdt.debug.core.cdi.ICDIExitInfo; @@ -474,6 +475,9 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode private ImageDescriptor[] computeBreakpointOverlays( ICBreakpoint breakpoint ) { ImageDescriptor[] overlays = new ImageDescriptor[]{ null, null, null, null }; try { + if ( CDebugCorePlugin.getDefault().getBreakpointActionManager().breakpointHasActions(breakpoint) ) { + overlays[OverlayImageDescriptor.BOTTOM_RIGHT] = (breakpoint.isEnabled()) ? CDebugImages.DESC_OVRS_BREAKPOINT_WITH_ACTIONS : CDebugImages.DESC_OVRS_BREAKPOINT_WITH_ACTIONS_DISABLED; + } if ( breakpoint.isConditional() ) { overlays[OverlayImageDescriptor.TOP_LEFT] = (breakpoint.isEnabled()) ? CDebugImages.DESC_OVRS_BREAKPOINT_CONDITIONAL : CDebugImages.DESC_OVRS_BREAKPOINT_CONDITIONAL_DISABLED; }