1 package net.sourceforge.phpdt.externaltools.preferences;
3 //import java.text.MessageFormat;
4 import java.util.MissingResourceException;
5 import java.util.ResourceBundle;
7 public class PHPPreferencesMessages {
9 private static final String RESOURCE_BUNDLE = PHPPreferencesMessages.class
12 private static ResourceBundle fgResourceBundle = ResourceBundle
13 .getBundle(RESOURCE_BUNDLE);
15 private PHPPreferencesMessages() {
18 public static String getString(String key) {
20 return fgResourceBundle.getString(key);
21 } catch (MissingResourceException e) {
22 return '!' + key + '!';
27 * Gets a string from the resource bundle and formats it with the argument
30 * the string used to get the bundle value, must not be null
32 // public static String getFormattedString(String key, Object arg) {
33 // return MessageFormat.format(getString(key), new Object[] { arg });
37 * Gets a string from the resource bundle and formats it with arguments
39 // public static String getFormattedString(String key, Object[] args) {
40 // return MessageFormat.format(getString(key), args);