Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2017-06-13 02:26:09 -0400
committerSarika Sinha2017-07-10 02:37:01 -0400
commitba40c99b85785a8844de6e4704546274345eb362 (patch)
tree183a1f0344a53cbc6910ac8e1b4ee25efbc22800
parent0c78dd2c256a6b6ed75683f5569708a2a9978fd6 (diff)
downloadeclipse.platform.debug-ba40c99b85785a8844de6e4704546274345eb362.tar.gz
eclipse.platform.debug-ba40c99b85785a8844de6e4704546274345eb362.tar.xz
eclipse.platform.debug-ba40c99b85785a8844de6e4704546274345eb362.zip
Bug 517470 - Switch to debug perspective should use verbs instead ofI20170713-0615I20170712-2000I20170711-2000I20170710-2000
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties11
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java9
3 files changed, 15 insertions, 8 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
index 0f642184f..040cec334 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -170,6 +170,7 @@ public class LaunchConfigurationsMessages extends NLS {
public static String PerspectiveManager_15;
public static String PerspectiveManager_suspend_description;
public static String PerspectiveManager_launch_description;
+ public static String PerspectiveManager_switch;
public static String DebugModePromptStatusHandler_0;
public static String DebugModePromptStatusHandler_1;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
index 7fa843497..3d7259a1a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2016 IBM Corporation and others.
+# Copyright (c) 2000, 2017 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
@@ -184,10 +184,11 @@ FavoritesDialog_8=Updating Favorites...
OrganizeFavoritesAction_0=Organize Fa&vorites...
PerspectiveManager_12=Confirm Perspective Switch
-PerspectiveManager_13=This kind of launch is configured to open the {0} perspective when it suspends. Do you want to open this perspective now?
-PerspectiveManager_15=This kind of launch is associated with the {0} perspective. Do you want to open this perspective now?
-PerspectiveManager_suspend_description=This kind of launch is configured to open the {0} perspective when it suspends.\n\n{1}\n\nDo you want to open this perspective now?
-PerspectiveManager_launch_description=This kind of launch is associated with the {0} perspective.\n\n{1}\n\nDo you want to open this perspective now?
+PerspectiveManager_13=This kind of launch is configured to open the {0} perspective when it suspends. Do you want to switch to this perspective now?
+PerspectiveManager_15=This kind of launch is associated with the {0} perspective. Do you want to switch to this perspective now?
+PerspectiveManager_suspend_description=This kind of launch is configured to open the {0} perspective when it suspends.\n\n{1}\n\nDo you want to switch to this perspective now?
+PerspectiveManager_launch_description=This kind of launch is associated with the {0} perspective.\n\n{1}\n\nDo you want to switch to this perspective now?
+PerspectiveManager_switch=&Switch
DebugModePromptStatusHandler_0=Breakpoints in Workspace
DebugModePromptStatusHandler_1=There are breakpoints enabled in the workspace. Would you rather launch in debug mode?
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
index 320225b9b..f210c6222 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -16,6 +16,7 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
@@ -49,6 +50,7 @@ import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.contexts.ISuspendTrigger;
import org.eclipse.debug.ui.contexts.ISuspendTriggerListener;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
@@ -675,7 +677,10 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
message = LaunchConfigurationsMessages.PerspectiveManager_15;
}
}
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoQuestion(shell, LaunchConfigurationsMessages.PerspectiveManager_12, MessageFormat.format(message, args), null, false, DebugUIPlugin.getDefault().getPreferenceStore(), preferenceKey);
+ LinkedHashMap<String, Integer> buttonLabelToId = new LinkedHashMap<>();
+ buttonLabelToId.put(LaunchConfigurationsMessages.PerspectiveManager_switch, IDialogConstants.YES_ID);
+ buttonLabelToId.put(IDialogConstants.CANCEL_LABEL, IDialogConstants.CANCEL_ID);
+ MessageDialogWithToggle dialog = MessageDialogWithToggle.open(MessageDialog.QUESTION, shell, LaunchConfigurationsMessages.PerspectiveManager_12, MessageFormat.format(message, args), null, false, DebugUIPlugin.getDefault().getPreferenceStore(), preferenceKey, SWT.NONE, buttonLabelToId);
boolean answer = (dialog.getReturnCode() == IDialogConstants.YES_ID);
synchronized (this) {
fPrompting= false;

Back to the top