diff dwtx/jface/text/source/JFaceTextMessages.d @ 159:7926b636c282

...
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 01:57:58 +0200
parents 25f1f92fa3df
children c6d7b1ea700b
line wrap: on
line diff
--- a/dwtx/jface/text/source/JFaceTextMessages.d	Tue Aug 26 02:46:34 2008 +0200
+++ b/dwtx/jface/text/source/JFaceTextMessages.d	Wed Aug 27 01:57:58 2008 +0200
@@ -89,10 +89,15 @@
 class JFaceTextMessages {
 
     /** The resource bundle name. */
-    private static const String RESOURCE_BUNDLE= "dwtx.jface.text.JFaceTextMessages";//$NON-NLS-1$
+//     private static const String RESOURCE_BUNDLE= "dwtx.jface.text.JFaceTextMessages";//$NON-NLS-1$
 
     /** The resource bundle. */
-    private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+    private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+    static this() {
+        fgResourceBundle = ResourceBundle.getBundle(
+            getImportData!("dwtx.jface.text.JFaceTextMessages.properties"));
+    }
 
     /**
      * Prohibits the creation of accessor objects.
@@ -110,7 +115,7 @@
         try {
             return fgResourceBundle.getString(key);
         } catch (MissingResourceException e) {
-            return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+            return "!" ~ key ~ "!";//$NON-NLS-2$ //$NON-NLS-1$
         }
     }
 
@@ -122,12 +127,12 @@
      * @return the formatted string
      * @since 3.0
      */
-    public static String getFormattedString(String key, Object[] args) {
+    public static String getFormattedString(String key, Object[] args...) {
         String format= null;
         try {
             format= fgResourceBundle.getString(key);
         } catch (MissingResourceException e) {
-            return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+            return "!" ~ key ~ "!";//$NON-NLS-2$ //$NON-NLS-1$
         }
         return MessageFormat.format(format, args);
     }