Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Barnes2005-04-07 15:29:21 +0000
committerKevin Barnes2005-04-07 15:29:21 +0000
commit113b19ab8a2f59bc53cd2b79d356cf7add6899df (patch)
tree4d6eb420bb1b735c01afa518f2acdc2b61d6a12c /org.eclipse.ui.externaltools/Program Tools Support
parentccc3192665aaab8767d0b6177d5f591402a306ab (diff)
downloadeclipse.platform.debug-113b19ab8a2f59bc53cd2b79d356cf7add6899df.tar.gz
eclipse.platform.debug-113b19ab8a2f59bc53cd2b79d356cf7add6899df.tar.xz
eclipse.platform.debug-113b19ab8a2f59bc53cd2b79d356cf7add6899df.zip
Bug 90455 - Move to new NLS API
Diffstat (limited to 'org.eclipse.ui.externaltools/Program Tools Support')
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/BackgroundResourceRefresher.java2
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java56
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties38
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java6
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java2
5 files changed, 55 insertions, 49 deletions
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/BackgroundResourceRefresher.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/BackgroundResourceRefresher.java
index c3061c8ba..18ed8d040 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/BackgroundResourceRefresher.java
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/BackgroundResourceRefresher.java
@@ -71,7 +71,7 @@ public class BackgroundResourceRefresher implements IDebugEventSetListener {
* Submits a job to do the refresh
*/
protected void refresh() {
- Job job= new Job(ExternalToolsProgramMessages.getString("BackgroundResourceRefresher.0")) { //$NON-NLS-1$
+ Job job= new Job(ExternalToolsProgramMessages.BackgroundResourceRefresher_0) { //$NON-NLS-1$
public IStatus run(IProgressMonitor monitor) {
try {
RefreshTab.refreshResources(fConfiguration, monitor);
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java
index d26f1bac5..eb82e5b50 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java
@@ -1,34 +1,40 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 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
+/**********************************************************************
+ * Copyright (c) 2005 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
+ * Contributors:
+ * IBM - Initial API and implementation
+ **********************************************************************/
package org.eclipse.ui.externaltools.internal.program.launchConfigurations;
+import org.eclipse.osgi.util.NLS;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+public class ExternalToolsProgramMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.ui.externaltools.internal.program.launchConfigurations.ExternalToolsProgramMessages";//$NON-NLS-1$
+ //
+ // Copyright (c) 2000, 2005 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:
+ // IBM Corporation - initial API and implementation
+ //
-public class ExternalToolsProgramMessages {
+ public static String BackgroundResourceRefresher_0;
- private static final String BUNDLE_NAME = "org.eclipse.ui.externaltools.internal.program.launchConfigurations.ExternalToolsProgramMessages"; //$NON-NLS-1$
+ public static String ProgramLaunchDelegate_Workbench_Closing_1;
+ public static String ProgramLaunchDelegate_The_workbench_is_exiting;
+ public static String ProgramLaunchDelegate_3;
+ public static String ProgramLaunchDelegate_4;
- private static final ResourceBundle RESOURCE_BUNDLE =
- ResourceBundle.getBundle(BUNDLE_NAME);
+ public static String ProgramMainTab_Select;
- private ExternalToolsProgramMessages() {
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, ExternalToolsProgramMessages.class);
}
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
+} \ No newline at end of file
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties
index 65bd2246a..1e5022ad2 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties
@@ -1,19 +1,19 @@
-###############################################################################
-# Copyright (c) 2000, 2005 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-BackgroundResourceRefresher.0=Refreshing resources...
-
-ProgramLaunchDelegate.Workbench_Closing_1=Workbench Closing
-ProgramLaunchDelegate.The_workbench_is_exiting=The workbench is exiting and a program launched from an external tool appears to still be running. These programs will be terminated when the workbench exits. It is recommended that you exit any external programs launched from the workbench before you proceed.\n\nClick OK to continue exiting the workbench.
-ProgramLaunchDelegate.3=Running {0}...
-ProgramLaunchDelegate.4=An IProcess could not be created for the launch
-
-ProgramMainTab.Select=&Select a program:
+###############################################################################
+# Copyright (c) 2000, 2005 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:
+# IBM Corporation - initial API and implementation
+###############################################################################
+
+BackgroundResourceRefresher_0=Refreshing resources...
+
+ProgramLaunchDelegate_Workbench_Closing_1=Workbench Closing
+ProgramLaunchDelegate_The_workbench_is_exiting=The workbench is exiting and a program launched from an external tool appears to still be running. These programs will be terminated when the workbench exits. It is recommended that you exit any external programs launched from the workbench before you proceed.\n\nClick OK to continue exiting the workbench.
+ProgramLaunchDelegate_3=Running {0}...
+ProgramLaunchDelegate_4=An IProcess could not be created for the launch
+
+ProgramMainTab_Select=&Select a program:
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java
index 6c0ec6485..19cedb961 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java
@@ -80,7 +80,7 @@ public class ProgramLaunchDelegate implements ILaunchConfigurationDelegate {
}
if (configType.equals(programType)) {
if (!launches[i].isTerminated()) {
- MessageDialog.openWarning(window.getShell(), ExternalToolsProgramMessages.getString("ProgramLaunchDelegate.Workbench_Closing_1"), ExternalToolsProgramMessages.getString("ProgramLaunchDelegate.The_workbench_is_exiting")); //$NON-NLS-1$ //$NON-NLS-2$
+ MessageDialog.openWarning(window.getShell(), ExternalToolsProgramMessages.ProgramLaunchDelegate_Workbench_Closing_1, ExternalToolsProgramMessages.ProgramLaunchDelegate_The_workbench_is_exiting); //$NON-NLS-1$ //$NON-NLS-2$
break;
}
}
@@ -163,11 +163,11 @@ public class ProgramLaunchDelegate implements ILaunchConfigurationDelegate {
processAttributes.put(IProcess.ATTR_PROCESS_TYPE, programName);
if (p != null) {
- monitor.beginTask(MessageFormat.format(ExternalToolsProgramMessages.getString("ProgramLaunchDelegate.3"), new String[] {configuration.getName()}), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
+ monitor.beginTask(MessageFormat.format(ExternalToolsProgramMessages.ProgramLaunchDelegate_3, new String[] {configuration.getName()}), IProgressMonitor.UNKNOWN); //$NON-NLS-1$
process = DebugPlugin.newProcess(launch, p, location.toOSString(), processAttributes);
if (process == null) {
p.destroy();
- throw new CoreException(new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, IExternalToolConstants.ERR_INTERNAL_ERROR, ExternalToolsProgramMessages.getString("ProgramLaunchDelegate.4"), null)); //$NON-NLS-1$
+ throw new CoreException(new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, IExternalToolConstants.ERR_INTERNAL_ERROR, ExternalToolsProgramMessages.ProgramLaunchDelegate_4, null)); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
index 54b58b479..19e2e7848 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
@@ -29,7 +29,7 @@ public class ProgramMainTab extends ExternalToolsMainTab {
*/
protected void handleWorkspaceLocationButtonSelected() {
FileSelectionDialog dialog;
- dialog = new FileSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), ExternalToolsProgramMessages.getString("ProgramMainTab.Select")); //$NON-NLS-1$
+ dialog = new FileSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), ExternalToolsProgramMessages.ProgramMainTab_Select); //$NON-NLS-1$
dialog.open();
IStructuredSelection result = dialog.getResult();
if (result == null) {

Back to the top