1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 510924 - Alt+Enter on breakpoint shows incomplete properties dialog

When using the "Alt-Enter" shortcut with a breakpoint selected, the
properties dialog that is created is missing some fields. This seems to
be caused by the fact that the dialog, when summoned in this way, is
created using a wrong context: an ICLineBreakpoint instead of the
expected CBreakpointContext. That context is then used to fetch
properties from the store, which fails.

This is a naive fix that attempts to work around this by creating a
proper context from the breakpoint.

Change-Id: I2b7c86965d09898dd1cd7eeb3c3f704bb2995e20
This commit is contained in:
Marc Dumais 2017-02-03 08:25:23 -05:00
parent 7f6e7f8c9b
commit 86189eeb86
3 changed files with 18 additions and 3 deletions

View file

@ -979,7 +979,12 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
*/
@Override
public void setElement( IAdaptable element ) {
fElement = element;
if (element instanceof ICBreakpoint) {
fElement = new CBreakpointContext((ICBreakpoint)element, null);
}
else {
fElement = element;
}
}
protected String[] getDebugModelIds() {

View file

@ -477,7 +477,12 @@ public class GDBDynamicPrintfPropertyPage extends FieldEditorPreferencePage impl
*/
@Override
public void setElement(IAdaptable element) {
fElement = element;
if (element instanceof ICBreakpoint) {
fElement = new CBreakpointContext((ICBreakpoint)element, null);
}
else {
fElement = element;
}
}
protected String[] getDebugModelIds() {

View file

@ -476,7 +476,12 @@ public class GDBTracepointPropertyPage extends FieldEditorPreferencePage impleme
*/
@Override
public void setElement(IAdaptable element) {
fElement = element;
if (element instanceof ICBreakpoint) {
fElement = new CBreakpointContext((ICBreakpoint)element, null);
}
else {
fElement = element;
}
}
protected String[] getDebugModelIds() {