A massive organize imports and formatting of the sources using default Eclipse code...
[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
10                         .getName();
11
12         private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
13                         .getBundle(BUNDLE_NAME);
14
15         private PHPDebugUiMessages() {
16         }
17
18         public static String getString(String key) {
19                 try {
20                         return RESOURCE_BUNDLE.getString(key);
21                 } catch (MissingResourceException e) {
22                         return '!' + key + '!';
23                 }
24         }
25
26         public static String getFormattedString(String key, Object arg) {
27                 return MessageFormat.format(getString(key), new Object[] { arg });
28         }
29
30         public static String getFormattedString(String key, Object[] args) {
31                 return MessageFormat.format(getString(key), args);
32         }
33 }