diff dwtx/jface/text/TextMessages.d @ 140:26688fec6d23

Following dsss compile errors
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 03:23:46 +0200
parents 7d818bd32d63
children 000f9136b8f7
line wrap: on
line diff
--- a/dwtx/jface/text/TextMessages.d	Sun Aug 24 02:31:41 2008 +0200
+++ b/dwtx/jface/text/TextMessages.d	Sun Aug 24 03:23:46 2008 +0200
@@ -4,7 +4,7 @@
  * 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
  * Port to the D programming language:
@@ -164,13 +164,19 @@
 
 /**
  * Helper class to get NLSed messages.
- * 
+ *
  * @since 3.4
  */
 class TextMessages {
-    private static final String BUNDLE_NAME= "dwtx.jface.text.TextMessages"; //$NON-NLS-1$
+//     private static final String BUNDLE_NAME= "dwtx.jface.text.TextMessages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE;//= ResourceBundle.getBundle(BUNDLE_NAME);
 
-    private static final ResourceBundle RESOURCE_BUNDLE= ResourceBundle.getBundle(BUNDLE_NAME);
+    static this() {
+        RESOURCE_BUNDLE = ResourceBundle.getBundle(
+            getImportData!("dwtx.jface.text.TextMessages.properties"));
+    }
+
 
     private this() {
     }
@@ -179,15 +185,11 @@
         try {
             return RESOURCE_BUNDLE.getString(key);
         } catch (MissingResourceException e) {
-            return '!' + key + '!';
+            return '!' ~ key ~ '!';
         }
     }
-    
-    public static String getFormattedString(String key, Object arg) {
-        return getFormattedString(key, new Object[] { arg });
-    }
 
-    public static String getFormattedString(String key, Object[] args) {
+    public static String getFormattedString(String key, Object[] args...) {
         return MessageFormat.format(getString(key), args);
     }