Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2010-05-04 13:07:26 -0400
committerPawel Piech2010-05-04 13:07:26 -0400
commite40c76732f7fbdd08361cb831ebd1c90e779a930 (patch)
tree17ab71e08bcb0a0b115cd1020c1c295e94680707
parent0cfc66350571db233810c85b42382f720294cbc5 (diff)
downloadeclipse.platform.debug-e40c76732f7fbdd08361cb831ebd1c90e779a930.tar.gz
eclipse.platform.debug-e40c76732f7fbdd08361cb831ebd1c90e779a930.tar.xz
eclipse.platform.debug-e40c76732f7fbdd08361cb831ebd1c90e779a930.zip
Bug 311474 - [debug view] Provide a default command handler for the Restart command
-rw-r--r--org.eclipse.debug.ui/plugin.xml3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandHandler.java27
3 files changed, 35 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
index 8cac651f4..41f5aaee2 100644
--- a/org.eclipse.debug.ui/plugin.xml
+++ b/org.eclipse.debug.ui/plugin.xml
@@ -1652,7 +1652,8 @@ M4 = Platform-specific fourth key
name="%ActionDefinition.restart.name"
categoryId="org.eclipse.debug.ui.category.run"
description="%ActionDefinition.restart.description"
- id="org.eclipse.debug.ui.commands.Restart">
+ id="org.eclipse.debug.ui.commands.Restart"
+ defaultHandler="org.eclipse.debug.internal.ui.commands.actions.RestartCommandHandler">
</command>
<command
name="%ActionDefinition.suspend.name"
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
index e03affc91..5661ca927 100644
--- 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
+ * Copyright (c) 2009, 2010 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
@@ -18,12 +18,16 @@ import org.eclipse.debug.ui.actions.DebugCommandAction;
import org.eclipse.jface.resource.ImageDescriptor;
/**
- * Handler for the
+ * Handler for the Restart action
*
* @since 3.6
*/
public class RestartCommandAction extends DebugCommandAction {
+ public RestartCommandAction() {
+ setActionDefinitionId("org.eclipse.debug.ui.commands.Restart"); //$NON-NLS-1$
+ }
+
protected Class getCommandType() {
return IRestartHandler.class;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandHandler.java
new file mode 100644
index 000000000..878dcc779
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandHandler.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.ui.actions.DebugCommandHandler;
+
+/**
+ * Command candler for the restart command (to enable key-binding activation).
+ *
+ * @since 3.6
+ */
+public class RestartCommandHandler extends DebugCommandHandler {
+
+ protected Class getCommandType() {
+ return IRestartHandler.class;
+ }
+
+}

Back to the top