PHP perspective and new Project Wizard
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / preferences / PHPPreferencesMessages.java
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPPreferencesMessages.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPPreferencesMessages.java
new file mode 100644 (file)
index 0000000..dfda1e6
--- /dev/null
@@ -0,0 +1,36 @@
+package net.sourceforge.phpeclipse.preferences;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class PHPPreferencesMessages {
+
+
+  private static final String RESOURCE_BUNDLE= "net.sourceforge.phpeclipse.preferences.PHPPreferencesMessages";//$NON-NLS-1$
+
+       private static ResourceBundle resourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+       private PHPPreferencesMessages() {
+       }
+
+       public static String getString(String key) {
+               try {
+                       return resourceBundle.getString(key);
+               } catch (MissingResourceException e) {
+                       return '!' + key + '!';
+               }
+       }
+       
+       public static String getFormattedString(String key, String arg) {
+               return getFormattedString(key, new String[] { arg });
+       }
+       
+       public static String getFormattedString(String key, String[] args) {
+               return MessageFormat.format(getString(key), args);      
+       }
+       
+       public static ResourceBundle getResourceBundle() {
+               return resourceBundle;
+       }
+}