1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 21:05:37 +02:00

Final merge of branch 'sd90' to master

This commit is contained in:
Andrew Gvozdev 2013-03-16 15:11:47 -04:00
commit 5a04c15baa
2 changed files with 33 additions and 5 deletions

View file

@ -23,6 +23,7 @@ import java.util.Set;
import org.eclipse.cdt.debug.core.CDIDebugModel; import org.eclipse.cdt.debug.core.CDIDebugModel;
import org.eclipse.cdt.debug.core.model.ICBreakpoint; 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.ICLineBreakpoint2;
import org.eclipse.cdt.debug.core.model.ICTracepoint; import org.eclipse.cdt.debug.core.model.ICTracepoint;
import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IMarker;
@ -141,14 +142,26 @@ public class CBreakpointPreferenceStore implements IPersistentPreferenceStore {
breakpoint.setCondition( getString( ICBreakpoint.CONDITION ) ); breakpoint.setCondition( getString( ICBreakpoint.CONDITION ) );
} }
else if ( property.equals( IMarker.LINE_NUMBER ) ) { else if ( property.equals( IMarker.LINE_NUMBER ) ) {
// already workspace runnable, setting markers are safe if (breakpoint instanceof ICLineBreakpoint2) {
breakpoint.getMarker().setAttribute(IMarker.LINE_NUMBER, getInt(IMarker.LINE_NUMBER)); // Must set the REQUESTED_LINE attribute first, or else the breakpoint
breakpoint.getMarker().setAttribute(ICLineBreakpoint2.REQUESTED_LINE, getInt(IMarker.LINE_NUMBER)); // 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 { } else {
// this allow set attributes contributed by other plugins // this allow set attributes contributed by other plugins
Object value = fProperties.get(property); Object value = fProperties.get(property);
if ( value != null ) { if ( value != null ) {
marker.setAttribute(property, value); 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();
}
} }
} }
} }

View file

@ -26,6 +26,7 @@ import org.eclipse.cdt.debug.core.model.IConnectHandler;
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector; import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector;
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor; import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor; import org.eclipse.cdt.dsf.concurrent.ImmediateDataRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
import org.eclipse.cdt.dsf.concurrent.ReflectionSequence; import org.eclipse.cdt.dsf.concurrent.ReflectionSequence;
import org.eclipse.cdt.dsf.concurrent.RequestMonitor; import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.concurrent.RequestMonitorWithProgress; import org.eclipse.cdt.dsf.concurrent.RequestMonitorWithProgress;
@ -210,11 +211,25 @@ public class FinalLaunchSequence extends ReflectionSequence {
new RequestMonitor(getExecutor(), requestMonitor) { new RequestMonitor(getExecutor(), requestMonitor) {
@Override @Override
protected void handleCompleted() { protected void handleCompleted() {
fCommandControl.setPrintPythonErrors(false, requestMonitor); fCommandControl.setPrintPythonErrors(false, new ImmediateRequestMonitor() {
@Override
protected void handleCompleted() {
// Ignore this error
// Bug 402988
requestMonitor.done();
}
});
} }
}); });
} else { } else {
fCommandControl.setPrintPythonErrors(false, requestMonitor); fCommandControl.setPrintPythonErrors(false, new ImmediateRequestMonitor() {
@Override
protected void handleCompleted() {
// Ignore this error
// Bug 402988
requestMonitor.done();
}
});
} }
} }