Mercurial > projects > dwt-addons
diff dwtx/jface/text/templates/JFaceTextTemplateMessages.d @ 145:02cd5f1224d3
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 22:31:00 +0200 |
parents | 7d818bd32d63 |
children | 000f9136b8f7 |
line wrap: on
line diff
--- a/dwtx/jface/text/templates/JFaceTextTemplateMessages.d Sun Aug 24 21:34:15 2008 +0200 +++ b/dwtx/jface/text/templates/JFaceTextTemplateMessages.d Sun Aug 24 22:31:00 2008 +0200 @@ -44,8 +44,13 @@ */ class JFaceTextTemplateMessages { - private static final String RESOURCE_BUNDLE= JFaceTextTemplateMessages.class.getName(); - private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE); +// private static final String RESOURCE_BUNDLE= JFaceTextTemplateMessages.class.getName(); + private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE); + + static this() { + fgResourceBundle = ResourceBundle.getBundle( + getImportData!("dwtx.jface.text.templates.JFaceTextTemplateMessages.properties")); + } private this() { } @@ -54,16 +59,11 @@ try { return fgResourceBundle.getString(key); } catch (MissingResourceException e) { - return '!' + key + '!'; + return '!' ~ key ~ '!'; } } - public static String getFormattedString(String key, Object arg) { - return MessageFormat.format(getString(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); } }