Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2009-09-11 14:54:31 -0400
committerPawel Piech2009-09-11 14:54:31 -0400
commitc4038c98424e7972ac934c397f48eabf6f9222d6 (patch)
tree8e0ca2c7e562dfba64f66e49a471bd3ef98aa993
parentb4a5f63c927fcca911789d0a42a6695eb017a5fd (diff)
downloadeclipse.platform.debug-c4038c98424e7972ac934c397f48eabf6f9222d6.tar.gz
eclipse.platform.debug-c4038c98424e7972ac934c397f48eabf6f9222d6.tar.xz
eclipse.platform.debug-c4038c98424e7972ac934c397f48eabf6f9222d6.zip
Bug 286256 - Request to move Restart icon to core debug framework
-rw-r--r--org.eclipse.debug.core/buildnotes_platform-debug.html9
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IRestartHandler.java27
-rw-r--r--org.eclipse.debug.examples.core/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java23
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java11
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java35
-rw-r--r--org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.examples.ui/plugin.xml8
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java40
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java54
-rw-r--r--org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs198
-rw-r--r--org.eclipse.debug.ui/plugin.properties4
-rw-r--r--org.eclipse.debug.ui/plugin.xml6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java60
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java55
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java20
20 files changed, 454 insertions, 112 deletions
diff --git a/org.eclipse.debug.core/buildnotes_platform-debug.html b/org.eclipse.debug.core/buildnotes_platform-debug.html
index 0014261a6..da972002a 100644
--- a/org.eclipse.debug.core/buildnotes_platform-debug.html
+++ b/org.eclipse.debug.core/buildnotes_platform-debug.html
@@ -22,6 +22,15 @@
<p><strong>Description:</strong>The <code>IDebugCommandHandler</code> interface allows debugger to implement debug action handlers which execute asynchronously. Most of the debugger actions user this interface to communicate with the debug model. However, debuggers which need to add their own asynchronous actions had to duplicate the debug framework actions which invoke the <code>IDebugCommandHandler</code> handlers. <code>DebugCommandAction</code> and <code>DebugCommandHandler</code> are base classes which can be extended by debuggers to implement new types of actions with asynchronous execution handlers. Also, this change includes a standard base class <code>AbstractDebugCommand</code> to help implement the <code>IDebugCommandHandler</code> interface.</p>
<p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
+<h3>IRestartHandler</h3>
+<p><strong>What is affected:</strong>
+<ul>
+ <li>Interface addition: <code>org.eclipse.debug.core.commands.IRestartHandler</code> </li>
+</ul>
+</p>
+<p><strong>Description:</strong>The <code>IRestartHandler</code> interface enables a new "Restart" command. If a debugger supplies the <code>IRestartHandler</code> as an adapter to debug model elements, the new Restart command will be enabled. The restart command appears in the Debug view context menu and can be configured as a short cut.</p>
+<p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
+
<p>&nbsp;</p>
</body>
</html>
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IRestartHandler.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IRestartHandler.java
new file mode 100644
index 000000000..0969d70b3
--- /dev/null
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IRestartHandler.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.core.commands;
+
+/**
+ * A restart command allows the debugger to quickly restart the current debug
+ * session without terminating and re-launching.
+ * <p>
+ * Clients may implement this interface. The debug platform provides a
+ * restart action that delegates to this handler interface. Platform does not
+ * provide a default implementation of this handler, so to enable this action
+ * the debugger implementation must provide one.
+ * </p>
+ *
+ * @since 3.6
+ */
+public interface IRestartHandler extends IDebugCommandHandler {
+
+}
diff --git a/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF
index 63456da11..7e1ec2ad8 100644
--- a/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Example Debug Core Plug-in
Bundle-SymbolicName: org.eclipse.debug.examples.core;singleton:=true
-Bundle-Version: 1.1.0
+Bundle-Version: 1.2.0
Bundle-Activator: org.eclipse.debug.examples.core.pda.DebugCorePlugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
diff --git a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java b/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
index 98a56ddc3..e140e1085 100644
--- a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
+++ b/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
@@ -454,7 +454,7 @@ public class PDAVirtualMachine {
fSuspendVM = "client";
}
-
+
void run() {
int id = fNextThreadId++;
sendDebugEvent("vmstarted", false);
@@ -687,6 +687,7 @@ public class PDAVirtualMachine {
else if ("popdata".equals(command)) debugPopData(args);
else if ("pushdata".equals(command)) debugPushData(args);
else if ("registers".equals(command)) debugRegisters(args);
+ else if ("restart".equals(command)) debugRestart(args);
else if ("resume".equals(command)) debugResume(args);
else if ("set".equals(command)) debugSetBreakpoint(args);
else if ("setdata".equals(command)) debugSetData(args);
@@ -944,7 +945,25 @@ public class PDAVirtualMachine {
response.append('\n');
sendCommandResponse(response.toString());
}
-
+
+ void debugRestart(Args args) {
+ fSuspendVM = "restart";
+
+ for (Iterator itr = fThreads.keySet().iterator(); itr.hasNext();) {
+ Integer id = (Integer)itr.next();
+ sendDebugEvent("exited " + id, false);
+ }
+ fThreads.clear();
+
+ int id = fNextThreadId++;
+ fThreads.put(new Integer(id), new PDAThread(id, "main", 0));
+ sendDebugEvent("started " + id, false);
+
+ fRegisters.clear();
+
+ sendCommandResponse("ok\n");
+ }
+
void debugResume(Args args) {
PDAThread thread = args.getThreadArg();
if (thread == null) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java
index 3705decea..92a5a9955 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java
@@ -52,6 +52,7 @@ import org.eclipse.debug.examples.core.pda.protocol.PDACommandResult;
import org.eclipse.debug.examples.core.pda.protocol.PDAEvent;
import org.eclipse.debug.examples.core.pda.protocol.PDAEventStopCommand;
import org.eclipse.debug.examples.core.pda.protocol.PDAExitedEvent;
+import org.eclipse.debug.examples.core.pda.protocol.PDARestartCommand;
import org.eclipse.debug.examples.core.pda.protocol.PDAStartedEvent;
import org.eclipse.debug.examples.core.pda.protocol.PDATerminateCommand;
import org.eclipse.debug.examples.core.pda.protocol.PDAVMResumeCommand;
@@ -568,4 +569,14 @@ public class PDADebugTarget extends PDADebugElement implements IDebugTarget, IBr
}
return null;
}
+
+ /**
+ * Restarts the current debug session
+ *
+ * @throws DebugException
+ */
+ public void restart() throws DebugException {
+ sendCommand(new PDARestartCommand());
+ }
+
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java
new file mode 100644
index 000000000..21e58c430
--- /dev/null
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Wind River 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.examples.core.pda.protocol;
+
+
+/**
+ * Restarts the debug session. All threads exit and the main threads starts
+ *
+ * <pre>
+ * C: restart
+ * E: exited 0
+ * E: started 1
+ * R: ok
+ * </pre>
+ */
+
+public class PDARestartCommand extends PDACommand {
+
+ public PDARestartCommand() {
+ super("restart");
+ }
+
+
+ public PDACommandResult createResult(String resultText) {
+ return new PDACommandResult(resultText);
+ }
+}
diff --git a/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
index 2b5754ac0..25f04b1e7 100644
--- a/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Example Debug UI Plug-in
Bundle-SymbolicName: org.eclipse.debug.examples.ui;singleton:=true
-Bundle-Version: 1.1.0
+Bundle-Version: 1.2.0
Bundle-Activator: org.eclipse.debug.examples.ui.pda.DebugUIPlugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
diff --git a/org.eclipse.debug.examples.ui/plugin.xml b/org.eclipse.debug.examples.ui/plugin.xml
index 55d4a1bdf..8a98ff28e 100644
--- a/org.eclipse.debug.examples.ui/plugin.xml
+++ b/org.eclipse.debug.examples.ui/plugin.xml
@@ -204,6 +204,14 @@
<adapter type="org.eclipse.debug.ui.actions.IRunToLineTarget"/>
<!--#endif -->
</factory>
+ <factory
+ adaptableType="org.eclipse.debug.examples.core.pda.model.PDADebugElement"
+ class="org.eclipse.debug.examples.ui.pda.adapters.CommandAdapterFactory">
+ <adapter
+ type="org.eclipse.debug.core.commands.IRestartHandler">
+ </adapter>
+ </factory>
+-->
<!-- FLEXIBLE HIERARCHY EXAMPLE
<factory
adaptableType="org.eclipse.debug.examples.core.pda.model.PDADebugTarget"
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java
new file mode 100644
index 000000000..3375fb088
--- /dev/null
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.examples.ui.pda.adapters;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.debug.core.commands.IRestartHandler;
+import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
+
+/**
+ * Adapter factory that provides debug command handler adapters for the
+ * PDA debugger.
+ *
+ * @since 3.6
+ */
+public class CommandAdapterFactory implements IAdapterFactory {
+
+ private static IRestartHandler fgRestartHandler = new PDARestartDebugCommand();
+
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (IRestartHandler.class.equals(adapterType)) {
+ if (adaptableObject instanceof PDADebugTarget) {
+ return fgRestartHandler;
+ }
+ }
+ return null;
+ }
+
+ public Class[] getAdapterList() {
+ return new Class[]{IRestartHandler.class};
+ }
+
+}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java
new file mode 100644
index 000000000..7bb788b24
--- /dev/null
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.examples.ui.pda.adapters;
+
+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.IEnabledStateRequest;
+import org.eclipse.debug.core.commands.IRestartHandler;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
+
+/**
+ * Restart debug command handler. It restarts the current debug session.
+ */
+public class PDARestartDebugCommand extends AbstractDebugCommand implements IRestartHandler {
+
+ protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException {
+ for (int i = 0; i < targets.length; i++) {
+ ((PDADebugTarget)targets[i]).restart();
+ monitor.worked(1);
+ }
+ }
+
+ protected Object getTarget(Object element) {
+ IDebugTarget target = (IDebugTarget)getAdapter(element, IDebugTarget.class);
+ if (target instanceof PDADebugTarget) {
+ return target;
+ }
+ return null;
+ }
+
+ protected boolean isExecutable(Object[] targets, IProgressMonitor monitor, IEnabledStateRequest request)
+ throws CoreException
+ {
+ for (int i = 0; i < targets.length; i++) {
+ if (((PDADebugTarget)targets[i]).isTerminated()) {
+ return false;
+ }
+ monitor.worked(1);
+ }
+ return true;
+ }
+
+}
diff --git a/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
index ed8c65edb..61c887fba 100644
--- a/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,99 +1,99 @@
-#Fri Feb 27 08:45:15 CST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=disabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
+#Thu Sep 10 09:34:51 PDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=disabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.debug.ui/plugin.properties b/org.eclipse.debug.ui/plugin.properties
index e88691353..a7fffe46f 100644
--- a/org.eclipse.debug.ui/plugin.properties
+++ b/org.eclipse.debug.ui/plugin.properties
@@ -197,10 +197,12 @@ ActionDefinition.stepOver.description= Step over
ActionDefinition.stepReturn.name= Step Return
ActionDefinition.stepReturn.description= Step return
+ActionDefinition.restart.name=Restart
+ActionDefinition.restart.description=Restart a process or debug target without terminating and re-launching
+
ActionDefinition.resume.name=Resume
ActionDefinition.resume.description=Resume
-
ActionDefinition.runToLine.name=Run to Line
ActionDefinition.runToLine.description=Resume and break when execution reaches the current line
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
index c662bff30..a862624b9 100644
--- a/org.eclipse.debug.ui/plugin.xml
+++ b/org.eclipse.debug.ui/plugin.xml
@@ -1645,6 +1645,12 @@ M4 = Platform-specific fourth key
id="org.eclipse.debug.ui.commands.TerminateAndRelaunch">
</command>
<command
+ name="%ActionDefinition.restart.name"
+ categoryId="org.eclipse.debug.ui.category.run"
+ description="%ActionDefinition.restart.description"
+ id="org.eclipse.debug.ui.commands.Restart">
+ </command>
+ <command
name="%ActionDefinition.suspend.name"
categoryId="org.eclipse.debug.ui.category.run"
description="%ActionDefinition.suspend.description"
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
index 6c989e50b..20472307e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
@@ -126,6 +126,7 @@ public class DebugPluginImages {
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TOGGLE_STEP_FILTERS, DLCL+"stepbystep_co.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_NEXT_THREAD, DLCL+"next_thread_nav.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_PREVIOUS_THREAD, DLCL+"prev_thread_nav.gif"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_RESTART, DLCL+"restart_co.gif"); //$NON-NLS-1$
// enabled local toolbars
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE, ELCL + "toggledetailpane_co.gif"); //$NON-NLS-1$
@@ -163,6 +164,7 @@ public class DebugPluginImages {
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_STANDARD_ERR, ELCL+"writeerr_co.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_NEXT_THREAD, ELCL+"next_thread_nav.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_PREVIOUS_THREAD, ELCL+"prev_thread_nav.gif"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_RESTART, ELCL+"restart_co.gif"); //$NON-NLS-1$
//Object
declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_DEBUG, OBJECT + "ldebug_obj.gif"); //$NON-NLS-1$
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
index 612177711..ccaf43bf6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
@@ -74,6 +74,7 @@ public interface IInternalDebugUIConstants {
public static final String IMG_DLCL_TOGGLE_STEP_FILTERS = "IMG_DLCL_TOGGLE_STEP_FILTERS"; //$NON-NLS-1$
public static final String IMG_DLCL_NEXT_THREAD = "IMG_DLCL_NEXT_THREAD"; //$NON-NLS-1$
public static final String IMG_DLCL_PREVIOUS_THREAD = "IMG_DLCL_PREVIOUS_THREAD"; //$NON-NLS-1$
+ public static final String IMG_DLCL_RESTART = "IMG_DLCL_RESTART"; //$NON-NLS-1$
//TODO: Move this IDebugUIConstants. Created too late in 3.2 cycle to add API.
//The enabled icon is already API.
@@ -118,6 +119,7 @@ public interface IInternalDebugUIConstants {
public static final String IMG_ELCL_STANDARD_ERR = "IMG_ELCL_STANDARD_ERR"; //$NON-NLS-1$
public static final String IMG_ELCL_NEXT_THREAD = "IMG_ELCL_NEXT_THREAD"; //$NON-NLS-1$
public static final String IMG_ELCL_PREVIOUS_THREAD = "IMG_ELCL_PREVIOUS_THREAD"; //$NON-NLS-1$
+ public static final String IMG_ELCL_RESTART = "IMG_ELCL_RESTART"; //$NON-NLS-1$
public static final String IMG_OBJS_COMMON_TAB = "IMG_OBJS_COMMON_TAB"; //$NON-NLS-1$
public static final String IMG_OBJS_REFRESH_TAB = "IMG_OBJS_REFRESH_TAB"; //$NON-NLS-1$
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
index b06bc1da7..56b9aa620 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
@@ -197,7 +197,11 @@ public class ActionMessages extends NLS {
public static String LaunchAction_2;
- public static String ResumeAction_0;
+ public static String RestartCommandAction__text;
+
+ public static String RestartCommandAction_tooltip;
+
+ public static String ResumeAction_0;
public static String ResumeAction_3;
public static String StepIntoAction_0;
public static String StepIntoAction_3;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
index 0ad24e7c4..827e59d3e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
@@ -174,6 +174,8 @@ StepOverAction_3=Step Over
LaunchAction_0=Remove Configuration
LaunchAction_1=Are you sure you want to remove {0} from the launch history?
LaunchAction_2=&Do not ask me again.
+RestartCommandAction__text=Restart
+RestartCommandAction_tooltip=Restart
ResumeAction_0=Resu&me
ResumeAction_3=Resume
DisconnectAction_0=Disconn&ect
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java
new file mode 100644
index 000000000..e03affc91
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.commands.actions;
+
+import org.eclipse.debug.core.commands.IRestartHandler;
+import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * Handler for the
+ *
+ * @since 3.6
+ */
+public class RestartCommandAction extends DebugCommandAction {
+
+ protected Class getCommandType() {
+ return IRestartHandler.class;
+ }
+
+ public ImageDescriptor getDisabledImageDescriptor() {
+ return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_RESTART);
+ }
+
+ public String getHelpContextId() {
+ return "org.eclipse.debug.ui.restart_action_context"; //$NON-NLS-1$
+ }
+
+ public ImageDescriptor getHoverImageDescriptor() {
+ return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESTART);
+ }
+
+ public String getId() {
+ return "org.eclipse.debug.ui.actions.Restart"; //$NON-NLS-1$
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESTART);
+ }
+
+ public String getText() {
+ return ActionMessages.RestartCommandAction__text;
+ }
+
+ public String getToolTipText() {
+ return ActionMessages.RestartCommandAction_tooltip;
+ }
+
+
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java
new file mode 100644
index 000000000..961b7cd85
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.debug.internal.ui.commands.actions;
+
+import org.eclipse.debug.ui.actions.DebugCommandAction;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+/**
+ * Restart action delegate.
+ *
+ * @since 3.6
+ */
+public class RestartCommandActionDelegate implements IWorkbenchWindowActionDelegate, IActionDelegate2 {
+
+ private DebugCommandAction fDebugAction = new RestartCommandAction();
+
+ public void dispose() {
+ fDebugAction.dispose();
+ }
+
+ public void init(IWorkbenchWindow window) {
+ fDebugAction.init(window);
+ }
+
+ public void run(IAction action) {
+ fDebugAction.run();
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ // do nothing
+ }
+
+ public void init(IAction action) {
+ fDebugAction.setActionProxy(action);
+
+ }
+
+ public void runWithEvent(IAction action, Event event) {
+ run(action);
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java
index 563dbdc8a..fff336567 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java
@@ -31,6 +31,7 @@ import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.commands.IRestartHandler;
import org.eclipse.debug.core.model.IDebugElement;
import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.IProcess;
@@ -43,6 +44,7 @@ import org.eclipse.debug.internal.ui.actions.AddToFavoritesAction;
import org.eclipse.debug.internal.ui.actions.EditLaunchConfigurationAction;
import org.eclipse.debug.internal.ui.commands.actions.DisconnectCommandAction;
import org.eclipse.debug.internal.ui.commands.actions.DropToFrameCommandAction;
+import org.eclipse.debug.internal.ui.commands.actions.RestartCommandAction;
import org.eclipse.debug.internal.ui.commands.actions.ResumeCommandAction;
import org.eclipse.debug.internal.ui.commands.actions.StepIntoCommandAction;
import org.eclipse.debug.internal.ui.commands.actions.StepOverCommandAction;
@@ -155,7 +157,9 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
private static final String TERMINATE_AND_RELAUNCH = "terminate_relaunch"; //$NON-NLS-1$
private static final String TOGGLE_STEP_FILTERS = "toggle_step_filters"; //$NON-NLS-1$
-
+
+ private static final String RESTART = "restart"; //$NON-NLS-1$
+
private static final int BREADCRUMB_TRIGGER_RANGE = 5; // pixels
private static final int BREADCRUMB_STICKY_RANGE = 20; // pixels
@@ -502,6 +506,7 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
addCapabilityAction(new DropToFrameCommandAction(), DROP_TO_FRAME);
addCapabilityAction(new TerminateAndRemoveAction(), TERMINATE_AND_REMOVE);
addCapabilityAction(new TerminateAndRelaunchAction(), TERMINATE_AND_RELAUNCH);
+ addCapabilityAction(new RestartCommandAction(), RESTART);
addCapabilityAction(new TerminateAllAction(), TERMINATE_ALL);
addCapabilityAction(new ToggleStepFiltersAction(), TOGGLE_STEP_FILTERS);
}
@@ -1019,6 +1024,7 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
disposeCommandAction(DROP_TO_FRAME);
disposeCommandAction(TERMINATE_AND_REMOVE);
disposeCommandAction(TERMINATE_AND_RELAUNCH);
+ disposeCommandAction(RESTART);
disposeCommandAction(TERMINATE_ALL);
}
@@ -1103,6 +1109,8 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
* @see org.eclipse.debug.ui.AbstractDebugView#fillContextMenu(org.eclipse.jface.action.IMenuManager)
*/
protected void fillContextMenu(IMenuManager menu) {
+ TreeSelection sel = (TreeSelection) fTreeViewerDebugContextProvider.getActiveContext();
+ Object element = sel != null && sel.size() > 0 ? sel.getFirstElement() : null;
menu.add(new Separator(IDebugUIConstants.EMPTY_EDIT_GROUP));
menu.add(new Separator(IDebugUIConstants.EDIT_GROUP));
@@ -1129,12 +1137,7 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
/**
* TODO hack to get around bug 148424, remove if UI ever fixes the PropertyDialogAction to respect enablesWhen conditions
*/
- TreeSelection sel = (TreeSelection) fTreeViewerDebugContextProvider.getActiveContext();
- boolean enabled = true;
- if(sel != null && sel.size() > 0) {
- enabled = !(sel.getFirstElement() instanceof ILaunch);
- }
- action.setEnabled(action.isApplicableForSelection() && enabled);
+ action.setEnabled(action.isApplicableForSelection() && !(element instanceof ILaunch));
menu.add(action);
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
@@ -1145,6 +1148,9 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
menu.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(SUSPEND));
menu.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(TERMINATE));
menu.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(TERMINATE_AND_RELAUNCH));
+ if (element instanceof IAdaptable && ((IAdaptable)element).getAdapter(IRestartHandler.class) != null) {
+ menu.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(RESTART));
+ }
menu.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(DISCONNECT));
menu.appendToGroup(IDebugUIConstants.STEP_INTO_GROUP, getAction(STEP_INTO));

Back to the top