This commit was generated by cvs2svn to compensate for changes in r50,
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.ui / src / net / sourceforge / phpdt / internal / debug / ui / PHPDebugUiMessages.java
1 package net.sourceforge.phpdt.internal.debug.ui;
2
3 import java.text.MessageFormat;
4 import java.util.MissingResourceException;
5 import java.util.ResourceBundle;
6
7 public class PHPDebugUiMessages {
8
9         private static final String BUNDLE_NAME = PHPDebugUiMessages.class.getName();
10         private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
11
12         private PHPDebugUiMessages() {}
13
14         public static String getString(String key) {
15                 try {
16                         return RESOURCE_BUNDLE.getString(key);
17                 } catch (MissingResourceException e) {
18                         return '!' + key + '!';
19                 }
20         }
21
22         public static String getFormattedString(String key, Object arg) {
23                 return MessageFormat.format(getString(key), new Object[] { arg });
24         }
25
26         public static String getFormattedString(String key, Object[] args) {
27                 return MessageFormat.format(getString(key), args);
28         }
29 }