diff options
Diffstat (limited to 'examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java')
-rw-r--r-- | examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java index dfcea485f..121b51848 100644 --- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java +++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.java @@ -18,8 +18,7 @@ import java.util.ResourceBundle; public class MessageLoader { private static final String RESOURCE_BUNDLE = MessageLoader.class.getName(); - private static ResourceBundle fgResourceBundle = ResourceBundle - .getBundle(RESOURCE_BUNDLE); + private static ResourceBundle fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); private MessageLoader() { } @@ -27,7 +26,7 @@ public class MessageLoader { public static String getString(String key) { try { return fgResourceBundle.getString(key); - } catch (MissingResourceException e) { + } catch (final MissingResourceException e) { return '!' + key + '!'; } } @@ -37,13 +36,18 @@ public class MessageLoader { * * @param key * the string used to get the bundle value, must not be null + * @param arg + * @return formatted string */ public static String getFormattedString(String key, Object arg) { - return MessageFormat.format(getString(key), new Object[] { arg }); + return MessageFormat.format(getString(key), new Object[] {arg}); } /** * Gets a string from the resource bundle and formats it with arguments + * @param key + * @param args + * @return formatted string. */ public static String getFormattedString(String key, Object[] args) { return MessageFormat.format(getString(key), args); |