Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorMarc Khouzam2013-03-13 09:46:26 -0400
committerMarc Khouzam2013-03-16 10:17:47 -0400
commit17569f458117959f3952f68f8eed7e017f6a7150 (patch)
tree3fe14452632e81970fb456be3c51b840082b73bf /debug
parent527d60717b1e94067cf52a2c9c9fdc6b99a46a2c (diff)
downloadorg.eclipse.cdt-17569f458117959f3952f68f8eed7e017f6a7150.tar.gz
org.eclipse.cdt-17569f458117959f3952f68f8eed7e017f6a7150.tar.xz
org.eclipse.cdt-17569f458117959f3952f68f8eed7e017f6a7150.zip
Bug 403166 - [breakpoints] Breakpoint message is not updated when
changing line number Change-Id: I3f28365acdc638e1c1007a0e916fec5edcf686f5 Reviewed-on: https://git.eclipse.org/r/11175 Reviewed-by: Pawel Piech <pawel.1.piech@gmail.com> Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java
index 612bae3e6d..468898d3e8 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPreferenceStore.java
@@ -23,6 +23,7 @@ import java.util.Set;
import org.eclipse.cdt.debug.core.CDIDebugModel;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
+import org.eclipse.cdt.debug.core.model.ICBreakpoint2;
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint2;
import org.eclipse.cdt.debug.core.model.ICTracepoint;
import org.eclipse.core.resources.IMarker;
@@ -141,14 +142,26 @@ public class CBreakpointPreferenceStore implements IPersistentPreferenceStore {
breakpoint.setCondition( getString( ICBreakpoint.CONDITION ) );
}
else if ( property.equals( IMarker.LINE_NUMBER ) ) {
- // already workspace runnable, setting markers are safe
- breakpoint.getMarker().setAttribute(IMarker.LINE_NUMBER, getInt(IMarker.LINE_NUMBER));
- breakpoint.getMarker().setAttribute(ICLineBreakpoint2.REQUESTED_LINE, getInt(IMarker.LINE_NUMBER));
+ if (breakpoint instanceof ICLineBreakpoint2) {
+ // Must set the REQUESTED_LINE attribute first, or else the breakpoint
+ // message will be refreshed improperly
+ ((ICLineBreakpoint2)breakpoint).setRequestedLine(getInt(IMarker.LINE_NUMBER));
+ ((ICLineBreakpoint2)breakpoint).setInstalledLineNumber(getInt(IMarker.LINE_NUMBER));
+ } else {
+ // already workspace runnable, setting markers are safe
+ breakpoint.getMarker().setAttribute(IMarker.LINE_NUMBER, getInt(IMarker.LINE_NUMBER));
+ breakpoint.getMarker().setAttribute(ICLineBreakpoint2.REQUESTED_LINE, getInt(IMarker.LINE_NUMBER));
+ }
} else {
// this allow set attributes contributed by other plugins
Object value = fProperties.get(property);
if ( value != null ) {
marker.setAttribute(property, value);
+ if (breakpoint instanceof ICBreakpoint2) {
+ // To be safe, refresh the breakpoint message as the property
+ // change might affect it.
+ ((ICBreakpoint2)breakpoint).refreshMessage();
+ }
}
}
}

Back to the top