|
From: <caw...@us...> - 2006-12-21 21:43:45
|
Revision: 1727
http://svn.sourceforge.net/rubyeclipse/?rev=1727&view=rev
Author: cawilliams
Date: 2006-12-21 13:43:43 -0800 (Thu, 21 Dec 2006)
Log Message:
-----------
have our translatable string bundle stuff use NLS class (much easier to use in our code)
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/DebuggerRunner.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingMessages.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingMessages.properties
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingPlugin.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyApplicationLaunchConfigurationDelegate.java
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyInterpreter.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rdocexport/RDocUtility.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/DebuggerRunner.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/DebuggerRunner.java 2006-12-21 21:43:13 UTC (rev 1726)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/DebuggerRunner.java 2006-12-21 21:43:43 UTC (rev 1727)
@@ -33,8 +33,7 @@
IStatus.ERROR,
RdtLaunchingPlugin.PLUGIN_ID,
IStatus.ERROR,
- RdtLaunchingMessages
- .getString("RdtLaunchingPlugin.processTerminatedBecauseNoDebuggerConnection"),
+ RdtLaunchingMessages.RdtLaunchingPlugin_processTerminatedBecauseNoDebuggerConnection,
null));
debugTarget.terminate();
}
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingMessages.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingMessages.java 2006-12-21 21:43:13 UTC (rev 1726)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingMessages.java 2006-12-21 21:43:43 UTC (rev 1727)
@@ -1,21 +1,20 @@
package org.rubypeople.rdt.internal.launching;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
public class RdtLaunchingMessages {
- private static final String BUNDLE_NAME = "org.rubypeople.rdt.internal.launching.RdtLaunchingMessages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = RdtLaunchingMessages.class.getName();
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
+ public static String RdtLaunchingPlugin_processTerminatedBecauseNoDebuggerConnection;
+ public static String RdtLaunchingPlugin_internalErrorOccurred;
+ public static String RdtLaunchingPlugin_noInterpreterSelected;
+ public static String RdtLaunchingPlugin_interpreterNotFound;
+ public static String RdtLaunchingPlugin_noInterpreterSelectedTitle;
+
private RdtLaunchingMessages() {}
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, RdtLaunchingMessages.class);
}
}
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingMessages.properties 2006-12-21 21:43:13 UTC (rev 1726)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingMessages.properties 2006-12-21 21:43:43 UTC (rev 1727)
@@ -7,8 +7,8 @@
# RdtLaunchingPlugin
#########################################
-RdtLaunchingPlugin.internalErrorOccurred=Internal error occurred
-RdtLaunchingPlugin.processTerminatedBecauseNoDebuggerConnection=Ruby process terminated because no connection to the debugger could me made
-RdtLaunchingPlugin.interpreterNotFound=Please check the location of the following interpreter: {0}
-RdtLaunchingPlugin.noInterpreterSelectedTitle=No interpreter selected
-RdtLaunchingPlugin.noInterpreterSelected=There is currently no ruby interpreter defined. Use preferences to define and select the active interpreter.
\ No newline at end of file
+RdtLaunchingPlugin_internalErrorOccurred=Internal error occurred
+RdtLaunchingPlugin_processTerminatedBecauseNoDebuggerConnection=Ruby process terminated because no connection to the debugger could me made
+RdtLaunchingPlugin_interpreterNotFound=Please check the location of the following interpreter: {0}
+RdtLaunchingPlugin_noInterpreterSelectedTitle=No interpreter selected
+RdtLaunchingPlugin_noInterpreterSelected=There is currently no ruby interpreter defined. Use preferences to define and select the active interpreter.
\ No newline at end of file
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingPlugin.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingPlugin.java 2006-12-21 21:43:13 UTC (rev 1726)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RdtLaunchingPlugin.java 2006-12-21 21:43:43 UTC (rev 1727)
@@ -41,7 +41,7 @@
}
public static void log(Throwable e) {
- log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, RdtLaunchingMessages.getString("RdtLaunchingPlugin.internalErrorOccurred"), e)); //$NON-NLS-1$
+ log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, RdtLaunchingMessages.RdtLaunchingPlugin_internalErrorOccurred, e));
}
public static void debug(String message) {
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyApplicationLaunchConfigurationDelegate.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyApplicationLaunchConfigurationDelegate.java 2006-12-21 21:43:13 UTC (rev 1726)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyApplicationLaunchConfigurationDelegate.java 2006-12-21 21:43:43 UTC (rev 1727)
@@ -21,7 +21,7 @@
*/
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
if (RubyRuntime.getDefault().getSelectedInterpreter() == null) {
- throw new CoreException(new Status(IStatus.ERROR, RdtLaunchingPlugin.PLUGIN_ID, IStatus.OK, RdtLaunchingMessages.getString("RdtLaunchingPlugin.noInterpreterSelected"), null));
+ throw new CoreException(new Status(IStatus.ERROR, RdtLaunchingPlugin.PLUGIN_ID, IStatus.OK, RdtLaunchingMessages.RdtLaunchingPlugin_noInterpreterSelected, null));
}
if (mode.equals("debug")) {
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyInterpreter.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyInterpreter.java 2006-12-21 21:43:13 UTC (rev 1726)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RubyInterpreter.java 2006-12-21 21:43:43 UTC (rev 1727)
@@ -62,7 +62,7 @@
if( new File(installLocation.toOSString()).isFile() ){
return installLocation.toOSString();
}
- String errorMessage = MessageFormat.format(RdtLaunchingMessages.getString("RdtLaunchingPlugin.interpreterNotFound"), new Object[] {this.getName()}) ;
+ String errorMessage = MessageFormat.format(RdtLaunchingMessages.RdtLaunchingPlugin_interpreterNotFound, new Object[] {this.getName()}) ;
throw new IllegalCommandException(errorMessage) ;
}
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rdocexport/RDocUtility.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rdocexport/RDocUtility.java 2006-12-21 21:43:13 UTC (rev 1726)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rdocexport/RDocUtility.java 2006-12-21 21:43:43 UTC (rev 1727)
@@ -85,10 +85,9 @@
public final void invoke() {
log("Generating RDoc for " + resource.getName());
- RdtLaunchingMessages.getString("RdtLaunchingPlugin.noInterpreterSelected");
IInterpreter interpreter = RubyRuntime.getDefault().getSelectedInterpreter();
if (interpreter == null) {
- MessageDialog.openInformation(RubyPlugin.getActiveWorkbenchShell(), RdtLaunchingMessages.getString("RdtLaunchingPlugin.noInterpreterSelectedTitle"), RdtLaunchingMessages.getString("RdtLaunchingPlugin.noInterpreterSelected"));
+ MessageDialog.openInformation(RubyPlugin.getActiveWorkbenchShell(), RdtLaunchingMessages.RdtLaunchingPlugin_noInterpreterSelectedTitle, RdtLaunchingMessages.RdtLaunchingPlugin_noInterpreterSelected);
return ;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|