mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-15 04:05:38 +02:00
Added overlay images for breakpoints with actions attached.
This commit is contained in:
parent
331091aebc
commit
891eaa7729
5 changed files with 17 additions and 0 deletions
|
@ -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) {
|
||||
|
|
BIN
debug/org.eclipse.cdt.debug.ui/icons/ovr16/actions_ovr.gif
Normal file
BIN
debug/org.eclipse.cdt.debug.ui/icons/ovr16/actions_ovr.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 B |
Binary file not shown.
After Width: | Height: | Size: 59 B |
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue