Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2007-05-16 18:45:14 +0000
committerMichael Rennie2007-05-16 18:45:14 +0000
commiteba701b9f5d1e59e3916df11128b883a0af95bc1 (patch)
treed386df9d296f8f8f619175864d6309ec8e2cf022 /org.eclipse.debug.ui
parent066031e10eecaf2b41d5586aed5378e135fd4edb (diff)
downloadeclipse.platform.debug-eba701b9f5d1e59e3916df11128b883a0af95bc1.tar.gz
eclipse.platform.debug-eba701b9f5d1e59e3916df11128b883a0af95bc1.tar.xz
eclipse.platform.debug-eba701b9f5d1e59e3916df11128b883a0af95bc1.zip
Bug 186527
F11 (Debug Last Launched) behaves wrong in 3.3m7
Diffstat (limited to 'org.eclipse.debug.ui')
-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.properties6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java19
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java19
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java26
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java19
6 files changed, 95 insertions, 0 deletions
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 3168b6b4b..f2c28586d 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
@@ -47,6 +47,8 @@ public class ActionMessages extends NLS {
public static String DebugLastAction_0;
public static String DebugLastAction_1;
+ public static String DebugLastAction_2;
+ public static String DebugLastAction_3;
public static String DetailPaneAssignValueAction_0;
public static String DetailPaneAssignValueAction_1;
@@ -74,6 +76,8 @@ public class ActionMessages extends NLS {
public static String ProfileLastAction_0;
public static String ProfileLastAction_1;
+ public static String ProfileLastAction_2;
+ public static String ProfileLastAction_3;
public static String RelaunchActionDelegate_An_exception_occurred_while_launching_2;
public static String RelaunchActionDelegate_Launch_Failed_1;
@@ -101,6 +105,8 @@ public class ActionMessages extends NLS {
public static String RunLastAction_0;
public static String RunLastAction_1;
+ public static String RunLastAction_2;
+ public static String RunLastAction_3;
public static String ShowSupportedBreakpointsAction_Show_For_Selected;
public static String ShowSupportedBreakpointsAction_tooltip;
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 737298587..56155e38f 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
@@ -180,8 +180,14 @@ ConfigureColumnsAction_1=Select the &columns to display:
ConfigureColumnsAction_2=Select Columns
ProfileLastAction_0=Profi&le Last Launched
ProfileLastAction_1=Profi&le
+ProfileLastAction_2=Profile the selected resource or active editor
+ProfileLastAction_3=Profile the previously launched application
DebugLastAction_0=&Debug Last Launched
DebugLastAction_1=&Debug
+DebugLastAction_2=Debug the selected resource or active editor
+DebugLastAction_3=Debug the previously launched application
RunLastAction_0=&Run Last Launched
RunLastAction_1=&Run
+RunLastAction_2=Run the selected resource or active editor
+RunLastAction_3=Run the previously launched application
OpenLaunchDialogAction_1=Open {0} Dialog...
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java
index f55030a92..cb82f4cbb 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java
@@ -57,5 +57,24 @@ public class DebugLastAction extends RelaunchLastAction {
*/
protected String getTooltipText() {
return ""; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getCommandId()
+ */
+ protected String getCommandId() {
+ return "org.eclipse.debug.ui.commands.DebugLast"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription()
+ */
+ protected String getDescription() {
+ if(LaunchingResourceManager.isContextLaunchEnabled()) {
+ return ActionMessages.DebugLastAction_2;
+ }
+ else {
+ return ActionMessages.DebugLastAction_3;
+ }
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java
index 5b020addf..34780d903 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java
@@ -58,5 +58,24 @@ public class ProfileLastAction extends RelaunchLastAction {
*/
protected String getTooltipText() {
return ""; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getCommandId()
+ */
+ protected String getCommandId() {
+ return "org.eclipse.debug.ui.commands.ProfileLast"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription()
+ */
+ protected String getDescription() {
+ if(LaunchingResourceManager.isContextLaunchEnabled()) {
+ return ActionMessages.ProfileLastAction_2;
+ }
+ else {
+ return ActionMessages.ProfileLastAction_3;
+ }
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
index cc41e55d9..e257f4975 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
@@ -11,6 +11,7 @@
package org.eclipse.debug.internal.ui.actions;
+import org.eclipse.core.commands.Command;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
@@ -30,6 +31,8 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
import com.ibm.icu.text.MessageFormat;
@@ -127,6 +130,14 @@ public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelega
fAction.setEnabled(existsConfigTypesForMode());
fAction.setText(getText());
fAction.setToolTipText(getTooltipText());
+ String commandId = getCommandId();
+ ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+ if (service != null) {
+ Command command = service.getCommand(commandId);
+ command.undefine();
+ command = service.getCommand(commandId);
+ command.define(DebugUIPlugin.removeAccelerators(getText()), getDescription(), service.getCategory("org.eclipse.debug.ui.category.run")); //$NON-NLS-1$
+ }
}
}
@@ -198,5 +209,20 @@ public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelega
*/
protected abstract String getTooltipText();
+ /**
+ * Returns the command id this action is associated with.
+ *
+ * @return command id
+ * @since 3.3
+ */
+ protected abstract String getCommandId();
+
+ /**
+ * Returns a description for this action (to associate with command).
+ *
+ * @return command description
+ * @since 3.3
+ */
+ protected abstract String getDescription();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java
index 9a4e03dc0..abf5d30c3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java
@@ -57,5 +57,24 @@ public class RunLastAction extends RelaunchLastAction {
*/
protected String getTooltipText() {
return ""; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getCommandId()
+ */
+ protected String getCommandId() {
+ return "org.eclipse.debug.ui.commands.RunLast"; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription()
+ */
+ protected String getDescription() {
+ if(LaunchingResourceManager.isContextLaunchEnabled()) {
+ return ActionMessages.RunLastAction_2;
+ }
+ else {
+ return ActionMessages.RunLastAction_3;
+ }
}
}

Back to the top