Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Dumais2017-02-03 08:25:23 -0500
committerMarc Dumais2017-02-07 13:01:54 -0500
commit143f85b06e81e9ad842392fc3c4a6166394d8a56 (patch)
treee98d5e654b6776d9ac0e37557244b1d57092b3e4
parent0e074ad3c1c3e1fe83501d97845c291ea7df0876 (diff)
downloadorg.eclipse.cdt-143f85b06e81e9ad842392fc3c4a6166394d8a56.tar.gz
org.eclipse.cdt-143f85b06e81e9ad842392fc3c4a6166394d8a56.tar.xz
org.eclipse.cdt-143f85b06e81e9ad842392fc3c4a6166394d8a56.zip
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 (cherry picked from commit 86189eeb868914ed137fd16c59aff7d521c3e6c5)
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java7
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java7
3 files changed, 18 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
index 8390e668df..3a4998f027 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
@@ -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() {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java
index 9d5e2b894c..bbe70f6ff6 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java
@@ -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() {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java
index 4456cc61db..8bf7eddd1d 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java
@@ -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() {

Back to the top