Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorPatrick Chuong2012-04-02 15:25:47 -0400
committerPatrick Chuong2012-04-02 16:31:30 -0400
commit01bc5a5c1fa8ae731a11bab5beb09535dd07d9bf (patch)
treef52281db759c56e1f8f709207eb2533d019a3b47 /debug
parent9ecafd83cd411748283c6ce5de912436cdcfd9fa (diff)
downloadorg.eclipse.cdt-01bc5a5c1fa8ae731a11bab5beb09535dd07d9bf.tar.gz
org.eclipse.cdt-01bc5a5c1fa8ae731a11bab5beb09535dd07d9bf.tar.xz
org.eclipse.cdt-01bc5a5c1fa8ae731a11bab5beb09535dd07d9bf.zip
Bug 375871 - Missing disassembly editor toggle breakpoint tester
Diffstat (limited to 'debug')
-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 76eee9c0b5..86a272813e 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 d4b161db19..dd5d7eaecc 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