mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 16:26:11 +02:00
[283156] Remove a problem marker before adding another one.
[272077] Remove problem markers when launch terminates.
This commit is contained in:
parent
57f33ecc8a
commit
73778a3286
1 changed files with 23 additions and 0 deletions
|
@ -607,6 +607,16 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
|
|
||||||
if (breakpoint instanceof ICLineBreakpoint) {
|
if (breakpoint instanceof ICLineBreakpoint) {
|
||||||
|
// If we have already have a problem marker on this breakpoint
|
||||||
|
// we should remove it first.
|
||||||
|
IMarker marker = fBreakpointMarkerProblems.remove(breakpoint);
|
||||||
|
if (marker != null) {
|
||||||
|
try {
|
||||||
|
marker.delete();
|
||||||
|
} catch (CoreException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ICLineBreakpoint lineBreakpoint = (ICLineBreakpoint) breakpoint;
|
ICLineBreakpoint lineBreakpoint = (ICLineBreakpoint) breakpoint;
|
||||||
try {
|
try {
|
||||||
// Locate the workspace resource via the breakpoint marker
|
// Locate the workspace resource via the breakpoint marker
|
||||||
|
@ -1274,6 +1284,8 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
Map<ICBreakpoint, Map<String, Object>> breakpoints = fPlatformBPs.get(ctx);
|
Map<ICBreakpoint, Map<String, Object>> breakpoints = fPlatformBPs.get(ctx);
|
||||||
clearBreakpointStatus(breakpoints.keySet().toArray(new ICBreakpoint[breakpoints.size()]));
|
clearBreakpointStatus(breakpoints.keySet().toArray(new ICBreakpoint[breakpoints.size()]));
|
||||||
}
|
}
|
||||||
|
// This will prevent Shutdown() from trying to remove bps from a
|
||||||
|
// backend that has already shutdown
|
||||||
fPlatformBPs.clear();
|
fPlatformBPs.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1297,6 +1309,17 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// First clear any problem markers
|
||||||
|
for (IMarker marker : fBreakpointMarkerProblems.values()) {
|
||||||
|
if (marker != null) {
|
||||||
|
try {
|
||||||
|
marker.delete();
|
||||||
|
} catch (CoreException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fBreakpointMarkerProblems.clear();
|
||||||
|
|
||||||
// Create the scheduling rule to clear all bp planted.
|
// Create the scheduling rule to clear all bp planted.
|
||||||
ISchedulingRule rule = null;
|
ISchedulingRule rule = null;
|
||||||
List<ISchedulingRule> markerRules = new ArrayList<ISchedulingRule>();
|
List<ISchedulingRule> markerRules = new ArrayList<ISchedulingRule>();
|
||||||
|
|
Loading…
Add table
Reference in a new issue