X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/obfuscator/export/ObfuscatorExportMessages.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/obfuscator/export/ObfuscatorExportMessages.java index 655f7c8..3878513 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/obfuscator/export/ObfuscatorExportMessages.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/obfuscator/export/ObfuscatorExportMessages.java @@ -9,7 +9,7 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package net.sourceforge.phpeclipse.obfuscator.export; - + import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; @@ -18,35 +18,41 @@ import java.util.ResourceBundle; * Utility class which helps managing messages */ class ObfuscatorExportMessages { - private static final String RESOURCE_BUNDLE= "net.sourceforge.phpeclipse.obfuscator.export.messages";//$NON-NLS-1$ - private static ResourceBundle bundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); -private ObfuscatorExportMessages(){ - // prevent instantiation of class -} -/** - * Returns the formatted message for the given key in - * the resource bundle. - * - * @param key the resource name - * @param args the message arguments - * @return the string - */ -public static String format(String key, Object[] args) { - return MessageFormat.format(getString(key),args); -} -/** - * Returns the resource object with the given key in - * the resource bundle. If there isn't any value under - * the given key, the key is returned. - * - * @param key the resource name - * @return the string - */ -public static String getString(String key) { - try { - return bundle.getString(key); - } catch (MissingResourceException e) { - return key; + private static final String RESOURCE_BUNDLE = "net.sourceforge.phpeclipse.obfuscator.export.messages";//$NON-NLS-1$ + + private static ResourceBundle bundle = ResourceBundle + .getBundle(RESOURCE_BUNDLE); + + private ObfuscatorExportMessages() { + // prevent instantiation of class + } + + /** + * Returns the formatted message for the given key in the resource bundle. + * + * @param key + * the resource name + * @param args + * the message arguments + * @return the string + */ + public static String format(String key, Object[] args) { + return MessageFormat.format(getString(key), args); + } + + /** + * Returns the resource object with the given key in the resource bundle. If + * there isn't any value under the given key, the key is returned. + * + * @param key + * the resource name + * @return the string + */ + public static String getString(String key) { + try { + return bundle.getString(key); + } catch (MissingResourceException e) { + return key; + } } -} }