Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'debug/org.eclipse.cdt.debug.ui')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/plugin.xml7
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ToggleCBreakpointTester.java14
2 files changed, 13 insertions, 8 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.xml b/debug/org.eclipse.cdt.debug.ui/plugin.xml
index 76eee9c0b5e..86a272813ed 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.xml
@@ -1828,9 +1828,7 @@
<or>
<test property="org.eclipse.cdt.debug.ui.isCEditorSupportsCBreakpoint"/>
<test property="org.eclipse.cdt.debug.ui.isAsmEditorSupportsCBreakpoint"/>
- <test
- property="org.eclipse.cdt.debug.ui.isDisassemblyEditorSupportsCBreakpoint">
- </test>
+ <test property="org.eclipse.cdt.debug.ui.isDisassemblyEditorSupportsCBreakpoint" />
<with variable="selection">
<count value="1"/>
<test property="org.eclipse.cdt.debug.ui.isCDeclarationSupportsCBreakpoint"/>
@@ -1849,7 +1847,8 @@
</reference>
<or>
<test property="org.eclipse.cdt.debug.ui.isCEditorSupportsCBreakpoint"/>
- <test property="org.eclipse.cdt.debug.ui.isAsmEditorSupportsCBreakpoint"/>
+ <test property="org.eclipse.cdt.debug.ui.isAsmEditorSupportsCBreakpoint"/>
+ <test property="org.eclipse.cdt.debug.ui.isDisassemblyEditorSupportsCBreakpoint" />
<with variable="selection">
<count value="1"/>
<test property="org.eclipse.cdt.debug.ui.isCDeclarationSupportsCBreakpoint"/>
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ToggleCBreakpointTester.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ToggleCBreakpointTester.java
index d4b161db193..dd5d7eaeccb 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ToggleCBreakpointTester.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ToggleCBreakpointTester.java
@@ -1,5 +1,5 @@
/*****************************************************************
- * Copyright (c) 2011 Texas Instruments and others
+ * Copyright (c) 2011, 2012 Texas Instruments and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* Patrick Chuong (Texas Instruments) -
* Update CDT ToggleBreakpointTargetFactory enablement (340177)
+ * Patrick Chuong (Texas Instruments) - Bug 375871
*****************************************************************/
package org.eclipse.cdt.debug.internal.ui.breakpoints;
@@ -20,6 +21,7 @@ import org.eclipse.cdt.core.model.IFunctionDeclaration;
import org.eclipse.cdt.core.model.IMethodDeclaration;
import org.eclipse.cdt.core.model.IVariableDeclaration;
import org.eclipse.cdt.debug.core.CDebugUtils;
+import org.eclipse.cdt.debug.internal.ui.disassembly.editor.DisassemblyEditor;
import org.eclipse.cdt.internal.ui.editor.CEditor;
import org.eclipse.cdt.internal.ui.editor.asm.AsmTextEditor;
import org.eclipse.core.expressions.PropertyTester;
@@ -87,12 +89,13 @@ public class ToggleCBreakpointTester extends PropertyTester {
return true; // can't figure the associated project, enable it by default.
}
}
-
- // test for IVariableDeclaration, IFunctionDeclaration, IMethodDeclaration
- } else if ("isCDeclarationSupportsCBreakpoint".equals(property) && (receiver instanceof List<?>)) { //$NON-NLS-1$
+ } else if ("isDisassemblyEditorSupportsCBreakpoint".equals(property) && (receiver instanceof DisassemblyEditor)) { //$NON-NLS-1$
if (!CDebugUtils.isCustomToggleBreakpointFactory())
return true;
+ // No additional check is required, the check for the receiver is enough.
+ // test for IVariableDeclaration, IFunctionDeclaration, IMethodDeclaration
+ } else if ("isCDeclarationSupportsCBreakpoint".equals(property) && (receiver instanceof List<?>)) { //$NON-NLS-1$
List<?> list = (List<?>) receiver;
if (list.size() == 1) {
Object element = list.get(0);
@@ -100,6 +103,9 @@ public class ToggleCBreakpointTester extends PropertyTester {
(element instanceof IVariableDeclaration ||
element instanceof IFunctionDeclaration ||
element instanceof IMethodDeclaration)) {
+
+ if (!CDebugUtils.isCustomToggleBreakpointFactory())
+ return true;
IDeclaration cElement = (IDeclaration) element;

Back to the top