mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 375871 - Missing disassembly editor toggle breakpoint tester
This commit is contained in:
parent
9ecafd83cd
commit
01bc5a5c1f
2 changed files with 13 additions and 8 deletions
|
@ -1828,9 +1828,7 @@
|
||||||
<or>
|
<or>
|
||||||
<test property="org.eclipse.cdt.debug.ui.isCEditorSupportsCBreakpoint"/>
|
<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
|
<test property="org.eclipse.cdt.debug.ui.isDisassemblyEditorSupportsCBreakpoint" />
|
||||||
property="org.eclipse.cdt.debug.ui.isDisassemblyEditorSupportsCBreakpoint">
|
|
||||||
</test>
|
|
||||||
<with variable="selection">
|
<with variable="selection">
|
||||||
<count value="1"/>
|
<count value="1"/>
|
||||||
<test property="org.eclipse.cdt.debug.ui.isCDeclarationSupportsCBreakpoint"/>
|
<test property="org.eclipse.cdt.debug.ui.isCDeclarationSupportsCBreakpoint"/>
|
||||||
|
@ -1850,6 +1848,7 @@
|
||||||
<or>
|
<or>
|
||||||
<test property="org.eclipse.cdt.debug.ui.isCEditorSupportsCBreakpoint"/>
|
<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">
|
<with variable="selection">
|
||||||
<count value="1"/>
|
<count value="1"/>
|
||||||
<test property="org.eclipse.cdt.debug.ui.isCDeclarationSupportsCBreakpoint"/>
|
<test property="org.eclipse.cdt.debug.ui.isCDeclarationSupportsCBreakpoint"/>
|
||||||
|
|
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Patrick Chuong (Texas Instruments) -
|
* Patrick Chuong (Texas Instruments) -
|
||||||
* Update CDT ToggleBreakpointTargetFactory enablement (340177)
|
* Update CDT ToggleBreakpointTargetFactory enablement (340177)
|
||||||
|
* Patrick Chuong (Texas Instruments) - Bug 375871
|
||||||
*****************************************************************/
|
*****************************************************************/
|
||||||
package org.eclipse.cdt.debug.internal.ui.breakpoints;
|
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.IMethodDeclaration;
|
||||||
import org.eclipse.cdt.core.model.IVariableDeclaration;
|
import org.eclipse.cdt.core.model.IVariableDeclaration;
|
||||||
import org.eclipse.cdt.debug.core.CDebugUtils;
|
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.CEditor;
|
||||||
import org.eclipse.cdt.internal.ui.editor.asm.AsmTextEditor;
|
import org.eclipse.cdt.internal.ui.editor.asm.AsmTextEditor;
|
||||||
import org.eclipse.core.expressions.PropertyTester;
|
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.
|
return true; // can't figure the associated project, enable it by default.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} 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
|
// test for IVariableDeclaration, IFunctionDeclaration, IMethodDeclaration
|
||||||
} else if ("isCDeclarationSupportsCBreakpoint".equals(property) && (receiver instanceof List<?>)) { //$NON-NLS-1$
|
} else if ("isCDeclarationSupportsCBreakpoint".equals(property) && (receiver instanceof List<?>)) { //$NON-NLS-1$
|
||||||
if (!CDebugUtils.isCustomToggleBreakpointFactory())
|
|
||||||
return true;
|
|
||||||
|
|
||||||
List<?> list = (List<?>) receiver;
|
List<?> list = (List<?>) receiver;
|
||||||
if (list.size() == 1) {
|
if (list.size() == 1) {
|
||||||
Object element = list.get(0);
|
Object element = list.get(0);
|
||||||
|
@ -101,6 +104,9 @@ public class ToggleCBreakpointTester extends PropertyTester {
|
||||||
element instanceof IFunctionDeclaration ||
|
element instanceof IFunctionDeclaration ||
|
||||||
element instanceof IMethodDeclaration)) {
|
element instanceof IMethodDeclaration)) {
|
||||||
|
|
||||||
|
if (!CDebugUtils.isCustomToggleBreakpointFactory())
|
||||||
|
return true;
|
||||||
|
|
||||||
IDeclaration cElement = (IDeclaration) element;
|
IDeclaration cElement = (IDeclaration) element;
|
||||||
|
|
||||||
// Handles the case for external file, check to see whether the file exist.
|
// Handles the case for external file, check to see whether the file exist.
|
||||||
|
|
Loading…
Add table
Reference in a new issue