Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authoraleon2013-04-30 11:59:16 -0400
committerMarc-Andre Laperle2013-04-30 14:26:00 -0400
commitbb755a01befd30c031965681aa8af8575bce52c5 (patch)
treef5b597f7cf5696b15c8e6481d8aa9586610a0605 /debug
parentcf3acef3f302dfc538ac0895ab90e421bc23df2c (diff)
downloadorg.eclipse.cdt-bb755a01befd30c031965681aa8af8575bce52c5.tar.gz
org.eclipse.cdt-bb755a01befd30c031965681aa8af8575bce52c5.tar.xz
org.eclipse.cdt-bb755a01befd30c031965681aa8af8575bce52c5.zip
Bug 244865 – Support for Step Into Selection
First Implementation: * Non-stop as well as All-stop debugging * Function / Method name validation, arguments size validation (no arguments signature yet) * Ctrl-F5 as short key (consistent with JDT) * Hyper link support with Ctrl-Shift click * Junit Test (Services part) Change-Id: I58903b4b6b7f9fd39a827f5297ad23ac3f96186d Reviewed-on: https://git.eclipse.org/r/11305 Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> IP-Clean: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IStepIntoSelectionHandler.java20
-rw-r--r--debug/org.eclipse.cdt.debug.ui/plugin.properties5
-rw-r--r--debug/org.eclipse.cdt.debug.ui/plugin.xml71
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/StepIntoSelectionCommandHandler.java22
4 files changed, 118 insertions, 0 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IStepIntoSelectionHandler.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IStepIntoSelectionHandler.java
new file mode 100644
index 0000000000..c3006dd509
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IStepIntoSelectionHandler.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Ericsson AB 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
+ *******************************************************************************/
+package org.eclipse.cdt.debug.core.model;
+
+import org.eclipse.debug.core.commands.IDebugCommandHandler;
+
+/**
+ * @since 7.3
+ *
+ */
+public interface IStepIntoSelectionHandler extends IDebugCommandHandler {
+}
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.properties b/debug/org.eclipse.cdt.debug.ui/plugin.properties
index 2266d66e86..0f70afeed0 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.properties
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.properties
@@ -12,6 +12,7 @@
# Dobrin Alexiev (Texas Instruments) - initial API and implementation (bug 336876)
# Marc Khouzam (Ericsson) - Added support for connect command (Bug 365601)
# Marc Dumais (Ericsson) - Added support for reverse debug action (Bug 365776)
+# Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
###############################################################################
pluginName=C/C++ Development Tools Debugger UI
@@ -248,3 +249,7 @@ DebugNewExecutable.name=Debug New Executable
DebugNewExecutable.description=Debug a new executable
DebugNewExecutable.label=Debug New Executable...
DebugNewExecutable.tooltip=Debug a new executable
+
+# Step into selection
+popup.stepIntoSelection.description=Step into the current selected statement
+popup.stepIntoSelection.name=Step Into Selection
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.xml b/debug/org.eclipse.cdt.debug.ui/plugin.xml
index d2b3fc1b6f..3ecc0ee12c 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.xml
@@ -2088,6 +2088,20 @@
class="org.eclipse.cdt.debug.internal.ui.commands.DebugNewExecutableHandler"
commandId="org.eclipse.cdt.debug.ui.command.debugNewExecutable">
</handler>
+ <handler
+ class="org.eclipse.cdt.debug.internal.ui.commands.StepIntoSelectionCommandHandler"
+ commandId="org.eclipse.cdt.debug.ui.command.StepIntoSelection">
+ <enabledWhen>
+ <and>
+ <with
+ variable="activeEditor">
+ <instanceof
+ value="org.eclipse.ui.texteditor.ITextEditor">
+ </instanceof>
+ </with>
+ </and>
+ </enabledWhen>
+ </handler>
</extension>
<extension
point="org.eclipse.core.expressions.definitions">
@@ -2180,6 +2194,10 @@
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="SHIFT+F7">
</key>
+ <key sequence="M1+F5"
+ contextId="org.eclipse.cdt.debug.ui.debugging"
+ commandId="org.eclipse.cdt.debug.ui.command.StepIntoSelection"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
</extension>
<extension
point="org.eclipse.ui.commands">
@@ -2191,6 +2209,13 @@
id="org.eclipse.cdt.debug.command.breakpointProperties"
name="%BreakpointPropertiesCommand.name">
</command>
+ <command
+ categoryId="org.eclipse.debug.ui.category.run"
+ description="%popup.stepIntoSelection.description"
+ helpContextId="step_into_selection_action_context"
+ id="org.eclipse.cdt.debug.ui.command.StepIntoSelection"
+ name="%popup.stepIntoSelection.name">
+ </command>
</extension>
<extension
point="org.eclipse.ui.menus">
@@ -2572,6 +2597,52 @@
style="push"
tooltip="%Connect.tooltip">
</command>
+
+ <!-- Step Into Selection debugging contributions -->
+ </menuContribution>
+ <menuContribution
+ locationURI="menu:org.eclipse.ui.run?endof=emptyStepGroup">
+ <command
+ commandId="org.eclipse.cdt.debug.ui.command.StepIntoSelection"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <systemTest
+ property="org.eclipse.cdt.debug.ui.debuggerActive"
+ value="true">
+ </systemTest>
+ <with
+ variable="activeEditor">
+ <instanceof
+ value="org.eclipse.ui.texteditor.ITextEditor">
+ </instanceof>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ locationURI="popup:#CEditorContext?before=additions">
+ <command
+ commandId="org.eclipse.cdt.debug.ui.command.StepIntoSelection"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <systemTest
+ property="org.eclipse.cdt.debug.ui.debuggerActive"
+ value="true">
+ </systemTest>
+ <with
+ variable="activeEditor">
+ <instanceof
+ value="org.eclipse.ui.texteditor.ITextEditor">
+ </instanceof>
+ </with>
+ </and>
+ </visibleWhen>
+ </command>
</menuContribution>
</extension>
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/StepIntoSelectionCommandHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/StepIntoSelectionCommandHandler.java
new file mode 100644
index 0000000000..f9a9b988cc
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/StepIntoSelectionCommandHandler.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Ericsson AB 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alvaro Sanchez-Leon (Ericsson AB) - Support for Step into selection (bug 244865)
+ *******************************************************************************/
+package org.eclipse.cdt.debug.internal.ui.commands;
+
+import org.eclipse.cdt.debug.core.model.IStepIntoSelectionHandler;
+import org.eclipse.debug.ui.actions.DebugCommandHandler;
+
+
+public class StepIntoSelectionCommandHandler extends DebugCommandHandler {
+ @Override
+ protected Class<?> getCommandType() {
+ return IStepIntoSelectionHandler.class;
+ }
+}

Back to the top