1 package net.sourceforge.phpeclipse.preferences;
3 import java.text.MessageFormat;
4 import java.util.MissingResourceException;
5 import java.util.ResourceBundle;
7 public class PHPPreferencesMessages {
10 private static final String RESOURCE_BUNDLE= "net.sourceforge.phpeclipse.preferences.PHPPreferencesMessages";//$NON-NLS-1$
12 private static ResourceBundle resourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
14 private PHPPreferencesMessages() {
17 public static String getString(String key) {
19 return resourceBundle.getString(key);
20 } catch (MissingResourceException e) {
21 return '!' + key + '!';
25 public static String getFormattedString(String key, String arg) {
26 return getFormattedString(key, new String[] { arg });
29 public static String getFormattedString(String key, String[] args) {
30 return MessageFormat.format(getString(key), args);
33 public static ResourceBundle getResourceBundle() {
34 return resourceBundle;