Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2004-06-22 18:45:18 +0000
committerMikhail Khodjaiants2004-06-22 18:45:18 +0000
commitacc1523fa103ee54a7dcb914fa57a764558de04e (patch)
treec6933cc2929dc36aa4a28b9ef75a29664fbb8aa7 /debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse
parent4a954e3d481dcda91dbfb07a9a420e9d8d3ed20a (diff)
downloadorg.eclipse.cdt-acc1523fa103ee54a7dcb914fa57a764558de04e.tar.gz
org.eclipse.cdt-acc1523fa103ee54a7dcb914fa57a764558de04e.tar.xz
org.eclipse.cdt-acc1523fa103ee54a7dcb914fa57a764558de04e.zip
Replaced global resource bundles by messages.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.java9
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPlugin.java33
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPluginResources.properties48
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.java10
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.java10
5 files changed, 13 insertions, 97 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.java
index 6ca950c438e..8c80c62bb23 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIMessages.java
@@ -11,21 +11,20 @@
package org.eclipse.cdt.debug.mi.internal.ui;
import java.util.MissingResourceException;
-//import java.util.ResourceBundle;
+import java.util.ResourceBundle;
public class MIUIMessages {
-// private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.internal.ui.MIUIMessages";//$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.internal.ui.MIUIMessages";//$NON-NLS-1$
-// private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
private MIUIMessages() {
}
public static String getString( String key ) {
try {
- return MIUIPlugin.getResourceString( key );
-// return RESOURCE_BUNDLE.getString( key );
+ return RESOURCE_BUNDLE.getString( key );
}
catch( MissingResourceException e ) {
return '!' + key + '!';
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPlugin.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPlugin.java
index ff26dfa0351..17f1a0962c1 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPlugin.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPlugin.java
@@ -1,7 +1,5 @@
package org.eclipse.cdt.debug.mi.internal.ui;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -18,15 +16,7 @@ public class MIUIPlugin extends AbstractUIPlugin {
//The shared instance.
private static MIUIPlugin plugin;
- //Resource bundle.
- private static ResourceBundle resourceBundle;
- static {
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.debug.mi.internal.ui.MIUIPluginResources"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
+
/**
* The constructor.
*/
@@ -50,27 +40,6 @@ public class MIUIPlugin extends AbstractUIPlugin {
}
/**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- } catch (NullPointerException e) {
- return '#' + key + '#';
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-
- /**
* Convenience method which returns the unique identifier of this plugin.
*
* @return the unique identifier of this plugin
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPluginResources.properties b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPluginResources.properties
deleted file mode 100644
index cc66ed7f639..00000000000
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/MIUIPluginResources.properties
+++ /dev/null
@@ -1,48 +0,0 @@
-CygwinDebuggerPage.0=Cygwin GDB Debugger Options
-GDBDebuggerPage.0=Debugger executable must be specified.
-GDBDebuggerPage.1=GDB Debugger Options
-GDBDebuggerPage.2=Main
-GDBDebuggerPage.3=GDB debugger:
-GDBDebuggerPage.4=&Browse...
-GDBDebuggerPage.5=GDB Debugger
-GDBDebuggerPage.6=GDB command file:
-GDBDebuggerPage.7=B&rowse...
-GDBDebuggerPage.8=GDB Command File
-GDBDebuggerPage.9=(Warning: Some commands in this file may interfere with the startup operation of the debugger, for example "run".)
-GDBDebuggerPage.10=Shared Libraries
-GDBServerDebuggerPage.0=TCP
-GDBServerDebuggerPage.1=Serial
-GDBServerDebuggerPage.2=Main
-GDBServerDebuggerPage.3=GDB debugger
-GDBServerDebuggerPage.4=&Browse...
-GDBServerDebuggerPage.5=GDB Debugger
-GDBServerDebuggerPage.6=GDB command file:
-GDBServerDebuggerPage.7=B&rowse...
-GDBServerDebuggerPage.8=GDB Command File
-GDBServerDebuggerPage.9=Connection:
-GDBSolibBlock.0=Load shared library symbols automatically
-GDBSolibBlock.1=Stop on shared library events
-SerialPortSettingsBlock.0=Device:
-SerialPortSettingsBlock.1=Speed:
-SerialPortSettingsBlock.2=Device must be specified.
-SerialPortSettingsBlock.3=Invalid device.
-SerialPortSettingsBlock.4=Speed must be specified.
-SolibSearchPathBlock.0=Add...
-SolibSearchPathBlock.1=Up
-SolibSearchPathBlock.2=Down
-SolibSearchPathBlock.3=Remove
-SolibSearchPathBlock.4=Directories:
-SolibSearchPathBlock.5=Select directory that contains shared library.
-TCPSettingsBlock.0=Host name or IP address:
-TCPSettingsBlock.1=Port number:
-TCPSettingsBlock.2=Host name or IP address must be specified.
-TCPSettingsBlock.3=Invalid host name or IP address.
-TCPSettingsBlock.4=Port number must be specified.
-TCPSettingsBlock.5=Invalid port number.
-SetAutoSolibActionDelegate.0=Exceptions occurred attempting to set 'Automatically Load Symbols' mode.
-SetAutoSolibActionDelegate.1=Set 'Automatically Load Symbols' mode failed.
-MIPreferencePage.0=General settings for GDB MI.
-MIPreferencePage.1=Communication
-MIPreferencePage.2=&Debugger timeout (ms):
-MIPreferencePage.3=&Launch timeout (ms):
-MIPreferencePage.4=The valid value range is [{0},{1}].
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.java
index c2ef6c777a1..124319aceb3 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/ActionMessages.java
@@ -11,22 +11,20 @@
package org.eclipse.cdt.debug.mi.internal.ui.actions;
import java.util.MissingResourceException;
-import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
-//import java.util.ResourceBundle;
+import java.util.ResourceBundle;
public class ActionMessages {
-// private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.internal.ui.actions.ActionMessages";//$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.internal.ui.actions.ActionMessages";//$NON-NLS-1$
-// private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
private ActionMessages() {
}
public static String getString( String key ) {
try {
- return MIUIPlugin.getResourceString( key );
-// return RESOURCE_BUNDLE.getString( key );
+ return RESOURCE_BUNDLE.getString( key );
}
catch( MissingResourceException e ) {
return '!' + key + '!';
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.java
index 330c7912a75..6279028f644 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/PreferenceMessages.java
@@ -11,22 +11,20 @@
package org.eclipse.cdt.debug.mi.internal.ui.preferences;
import java.util.MissingResourceException;
-import org.eclipse.cdt.debug.mi.internal.ui.MIUIPlugin;
-//import java.util.ResourceBundle;
+import java.util.ResourceBundle;
public class PreferenceMessages {
-// private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.internal.ui.preferences.PreferenceMessages";//$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.debug.mi.internal.ui.preferences.PreferenceMessages";//$NON-NLS-1$
-// private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
private PreferenceMessages() {
}
public static String getString( String key ) {
try {
- return MIUIPlugin.getResourceString( key );
-// return RESOURCE_BUNDLE.getString( key );
+ return RESOURCE_BUNDLE.getString( key );
}
catch( MissingResourceException e ) {
return '!' + key + '!';

Back to the top