diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IResumeWithoutSignalHandler.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IResumeWithoutSignalHandler.java
new file mode 100644
index 00000000000..a0802d4aa1b
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/IResumeWithoutSignalHandler.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ericsson 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:
+ * Ericsson - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.core.model;
+
+import org.eclipse.debug.core.commands.IDebugCommandHandler;
+
+/**
+ * Handler interface to perform a resume without signal operation
+ *
+ * @since 7.0
+ */
+public interface IResumeWithoutSignalHandler extends IDebugCommandHandler {
+}
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.properties b/debug/org.eclipse.cdt.debug.ui/plugin.properties
index d788dd9dde7..2f0b4e2344a 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.properties
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.properties
@@ -84,8 +84,6 @@ LoadSymbolsForAllAction.tooltip=Load Symbols For All Modules
SignalAction.label=Resume With Signal
SignalAction.tooltip=Resume With Signal
-SignalZeroAction.label=Resume Without Signal
-SignalZeroAction.tooltip=Resume Ignoring Signal
SignalPropertiesAction.label=Signal Properties...
SignalPropertiesAction.tooltip=Open Signal Properties Dialog
@@ -200,6 +198,14 @@ CApplicationShortcut.label=Local C/C++ Application
ContextualRunCApplication.description=Runs a local C/C++ application
ContextualDebugCApplication.description=Debugs a local C/C++ application
+#Run Control commands
+RunControlCategory.name=Run Control Commands
+RunControlCategory.description=Set of commands for Run Control
+ResumeWithoutSignal.name=Resume Without Signal
+ResumeWithoutSignal.description=Resume Without Signal
+ResumeWithoutSignal.label=Resume Without Signal
+ResumeWithoutSignal.tooltip=Resume Ignoring Signal
+
# Reverse debugging
ReverseActionSet.label = Reverse Debugging
ReverseDebuggingCategory.name = Reverse Debugging Commands
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.xml b/debug/org.eclipse.cdt.debug.ui/plugin.xml
index 2557f83f32e..96e49400b1a 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.xml
@@ -263,16 +263,6 @@
helpContextId="move_to_line_action_context"
label="%GlobalMoveToLineAction.label"
menubarPath="org.eclipse.ui.run/stepGroup"/>
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -392,27 +415,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1571,6 +1569,27 @@
type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory">
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2038,6 +2057,18 @@
id="org.eclipse.cdt.debug.ui.command.saveTraceData"
name="%SaveTraceData.name">
+
+
+
+
@@ -2073,6 +2104,11 @@
class="org.eclipse.cdt.debug.internal.ui.commands.SaveTraceDataCommandHandler"
commandId="org.eclipse.cdt.debug.ui.command.saveTraceData">
+
+
@@ -2118,6 +2154,18 @@
+
+
+
+
+
+
+
+
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties
index a2cdc289966..853a40bc1ca 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ActionMessages.properties
@@ -20,9 +20,6 @@ LoadSymbolsForAllActionDelegate.Error_1=Error
LoadSymbolsForAllActionDelegate.0=Operation failed.
LoadModuleSymbolsActionDelegate.0=Unable to load symbols.
LoadSymbolsForAllAction.Unable_to_load_symbols_1=Unable to load symbols.
-SignalZeroWorkbenchActionDelegate.0=Exceptions occurred attempting to resume without signal.
-SignalZeroWorkbenchActionDelegate.1=Resume without signal failed.
-SignalZeroWorkbenchActionDelegate.2=Resume Without Signal
SignalZeroObjectActionDelegate.0=Unable to resume ignoring the signal.
SignalZeroObjectActionDelegate.1=Operation failed.
RunToLineActionDelegate.Error_1=Error
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RetargettableActionAdapterFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RetargettableActionAdapterFactory.java
index ba6763faa85..c2f1a207d79 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RetargettableActionAdapterFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RetargettableActionAdapterFactory.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.debug.internal.ui.actions;
+import org.eclipse.cdt.debug.core.model.IResumeWithoutSignalHandler;
+import org.eclipse.cdt.debug.internal.ui.commands.ResumeWithoutSignalCommand;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.debug.ui.actions.IRunToLineTarget;
@@ -32,6 +34,9 @@ public class RetargettableActionAdapterFactory implements IAdapterFactory {
}
if ( adapterType == IMoveToLineTarget.class ) {
return new MoveToLineAdapter();
+ }
+ if ( adapterType == IResumeWithoutSignalHandler.class ) {
+ return new ResumeWithoutSignalCommand();
}
return null;
}
@@ -40,6 +45,9 @@ public class RetargettableActionAdapterFactory implements IAdapterFactory {
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
*/
public Class[] getAdapterList() {
- return new Class[]{ IRunToLineTarget.class, IResumeAtLineTarget.class, IMoveToLineTarget.class };
+ return new Class[]{ IRunToLineTarget.class,
+ IResumeAtLineTarget.class,
+ IMoveToLineTarget.class,
+ IResumeWithoutSignalHandler.class };
}
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroWorkbenchActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroWorkbenchActionDelegate.java
deleted file mode 100644
index e532bade2df..00000000000
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/SignalZeroWorkbenchActionDelegate.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 QNX Software Systems 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:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.debug.internal.ui.actions;
-
-import org.eclipse.cdt.debug.core.model.IResumeWithoutSignal;
-import org.eclipse.debug.core.DebugException;
-
-/**
- * The workbench delegate of the "Resume Without Signal" action.
- */
-public class SignalZeroWorkbenchActionDelegate extends AbstractListenerActionDelegate {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.internal.ui.actions.AbstractDebugActionDelegate#doAction(java.lang.Object)
- */
- protected void doAction( Object element ) throws DebugException {
- if ( element instanceof IResumeWithoutSignal ) {
- ((IResumeWithoutSignal)element).resumeWithoutSignal();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.cdt.debug.internal.ui.actions.AbstractDebugActionDelegate#isEnabledFor(java.lang.Object)
- */
- protected boolean isEnabledFor( Object element ) {
- if ( element instanceof IResumeWithoutSignal ) {
- return ((IResumeWithoutSignal)element).canResumeWithoutSignal();
- }
- return false;
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.getString( "SignalZeroWorkbenchActionDelegate.0" ); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.getString( "SignalZeroWorkbenchActionDelegate.1" ); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogTitle()
- */
- protected String getErrorDialogTitle() {
- return ActionMessages.getString( "SignalZeroWorkbenchActionDelegate.2" ); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.cdt.debug.internal.ui.actions.AbstractDebugActionDelegate#isRunInBackground()
- */
- protected boolean isRunInBackground() {
- return true;
- }
-}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ResumeWithoutSignalCommand.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ResumeWithoutSignalCommand.java
new file mode 100644
index 00000000000..e577d973621
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ResumeWithoutSignalCommand.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ericsson 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:
+ * Ericsson - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.internal.ui.commands;
+
+import org.eclipse.cdt.debug.core.model.IResumeWithoutSignal;
+import org.eclipse.cdt.debug.core.model.IResumeWithoutSignalHandler;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IRequest;
+import org.eclipse.debug.core.commands.AbstractDebugCommand;
+import org.eclipse.debug.core.commands.IEnabledStateRequest;
+
+/**
+ * The handler for the "Resume Without Signal" command.
+ *
+ * @since 7.0
+ */
+public class ResumeWithoutSignalCommand extends AbstractDebugCommand implements IResumeWithoutSignalHandler {
+
+ @Override
+ protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException {
+ if (targets.length != 1) {
+ return;
+ }
+
+ IResumeWithoutSignal target = (IResumeWithoutSignal)targets[0];
+ target.resumeWithoutSignal();
+ }
+
+ @Override
+ protected boolean isExecutable(Object[] targets, IProgressMonitor monitor, IEnabledStateRequest request) throws CoreException {
+ if (targets.length != 1) {
+ return false;
+ }
+
+ IResumeWithoutSignal target = (IResumeWithoutSignal)targets[0];
+ return target.canResumeWithoutSignal();
+ }
+
+ @Override
+ protected Object getTarget(Object element) {
+ return DebugPlugin.getAdapter(element, IResumeWithoutSignal.class);
+ }
+}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ResumeWithoutSignalCommandHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ResumeWithoutSignalCommandHandler.java
new file mode 100644
index 00000000000..9e6e764015b
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ResumeWithoutSignalCommandHandler.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ericsson 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:
+ * Ericsson - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.internal.ui.commands;
+
+import org.eclipse.cdt.debug.core.model.IResumeWithoutSignalHandler;
+import org.eclipse.debug.ui.actions.DebugCommandHandler;
+
+/**
+ * Command handler to trigger a resume without signal operation
+ *
+ * @since 7.0
+ */
+public class ResumeWithoutSignalCommandHandler extends DebugCommandHandler {
+ @Override
+ protected Class> getCommandType() {
+ return IResumeWithoutSignalHandler.class;
+ }
+}
\ No newline at end of file
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java
index f0489d8e2de..07429177cd6 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java
@@ -17,6 +17,7 @@ import java.util.WeakHashMap;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
import org.eclipse.cdt.debug.core.model.IRestart;
+import org.eclipse.cdt.debug.core.model.IResumeWithoutSignalHandler;
import org.eclipse.cdt.debug.core.model.IReverseResumeHandler;
import org.eclipse.cdt.debug.core.model.IReverseStepIntoHandler;
import org.eclipse.cdt.debug.core.model.IReverseStepOverHandler;
@@ -44,6 +45,7 @@ import org.eclipse.cdt.dsf.gdb.internal.ui.actions.GdbConnectCommand;
import org.eclipse.cdt.dsf.gdb.internal.ui.actions.GdbDisconnectCommand;
import org.eclipse.cdt.dsf.gdb.internal.ui.actions.GdbRestartCommand;
import org.eclipse.cdt.dsf.gdb.internal.ui.actions.GdbSteppingModeTarget;
+import org.eclipse.cdt.dsf.gdb.internal.ui.commands.GdbResumeWithoutSignalCommand;
import org.eclipse.cdt.dsf.gdb.internal.ui.commands.GdbReverseResumeCommand;
import org.eclipse.cdt.dsf.gdb.internal.ui.commands.GdbReverseStepIntoCommand;
import org.eclipse.cdt.dsf.gdb.internal.ui.commands.GdbReverseStepOverCommand;
@@ -101,6 +103,7 @@ public class GdbAdapterFactory
final DsfSuspendCommand fSuspendCommand;
final DsfResumeCommand fResumeCommand;
final GdbReverseResumeCommand fReverseResumeCommand;
+ final GdbResumeWithoutSignalCommand fResumeWithoutSignalCommand;
final GdbRestartCommand fRestartCommand;
final DsfTerminateCommand fTerminateCommand;
final GdbConnectCommand fConnectCommand;
@@ -144,6 +147,7 @@ public class GdbAdapterFactory
fSuspendCommand = new DsfSuspendCommand(session);
fResumeCommand = new DsfResumeCommand(session);
fReverseResumeCommand = new GdbReverseResumeCommand(session);
+ fResumeWithoutSignalCommand = new GdbResumeWithoutSignalCommand(session);
fRestartCommand = new GdbRestartCommand(session, fLaunch);
fTerminateCommand = new DsfTerminateCommand(session);
fConnectCommand = new GdbConnectCommand(session);
@@ -166,6 +170,7 @@ public class GdbAdapterFactory
session.registerModelAdapter(ISuspendHandler.class, fSuspendCommand);
session.registerModelAdapter(IResumeHandler.class, fResumeCommand);
session.registerModelAdapter(IReverseResumeHandler.class, fReverseResumeCommand);
+ session.registerModelAdapter(IResumeWithoutSignalHandler.class, fResumeWithoutSignalCommand);
session.registerModelAdapter(IRestart.class, fRestartCommand);
session.registerModelAdapter(ITerminateHandler.class, fTerminateCommand);
session.registerModelAdapter(IConnect.class, fConnectCommand);
@@ -214,6 +219,7 @@ public class GdbAdapterFactory
session.unregisterModelAdapter(ISuspendHandler.class);
session.unregisterModelAdapter(IResumeHandler.class);
session.unregisterModelAdapter(IReverseResumeHandler.class);
+ session.unregisterModelAdapter(IResumeWithoutSignalHandler.class);
session.unregisterModelAdapter(IRestart.class);
session.unregisterModelAdapter(ITerminateHandler.class);
session.unregisterModelAdapter(IConnect.class);
@@ -235,6 +241,7 @@ public class GdbAdapterFactory
fSuspendCommand.dispose();
fResumeCommand.dispose();
fReverseResumeCommand.dispose();
+ fResumeWithoutSignalCommand.dispose();
fRestartCommand.dispose();
fTerminateCommand.dispose();
fConnectCommand.dispose();
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbResumeWithoutSignalCommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbResumeWithoutSignalCommand.java
new file mode 100644
index 00000000000..66d49dfb81c
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbResumeWithoutSignalCommand.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Ericsson 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:
+ * Ericsson - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.commands;
+
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.eclipse.cdt.debug.core.model.IResumeWithoutSignalHandler;
+import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
+import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
+import org.eclipse.cdt.dsf.concurrent.Query;
+import org.eclipse.cdt.dsf.datamodel.DMContexts;
+import org.eclipse.cdt.dsf.debug.service.IRunControl;
+import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
+import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
+import org.eclipse.cdt.dsf.service.DsfServicesTracker;
+import org.eclipse.cdt.dsf.service.DsfSession;
+import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.IRequest;
+import org.eclipse.debug.core.commands.AbstractDebugCommand;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
+import org.eclipse.debug.core.commands.IEnabledStateRequest;
+
+/**
+ * Command performing a resume without signal.
+ *
+ * @since 2.1
+ */
+public class GdbResumeWithoutSignalCommand extends AbstractDebugCommand implements IResumeWithoutSignalHandler {
+ private final DsfExecutor fExecutor;
+ private final DsfServicesTracker fTracker;
+
+ public GdbResumeWithoutSignalCommand(DsfSession session) {
+ fExecutor = session.getExecutor();
+ fTracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), session.getId());
+ }
+
+ public void dispose() {
+ fTracker.dispose();
+ }
+
+ @Override
+ protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException {
+ if (targets.length != 1) {
+ return;
+ }
+
+ final IExecutionDMContext dmc = DMContexts.getAncestorOfType(((IDMVMContext)targets[0]).getDMContext(), IExecutionDMContext.class);
+ if (dmc == null) {
+ return;
+ }
+
+ Query