2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.ui;
7 import java.text.MessageFormat;
8 import java.util.MissingResourceException;
9 import java.util.ResourceBundle;
11 public class JavaUIMessages {
13 private static final String RESOURCE_BUNDLE= "org.eclipse.jdt.internal.ui.JavaUIMessages";//$NON-NLS-1$
15 private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
17 private JavaUIMessages() {
20 public static String getString(String key) {
22 return fgResourceBundle.getString(key);
23 } catch (MissingResourceException e) {
24 return '!' + key + '!';
28 public static String getFormattedString(String key, String arg) {
29 return getFormattedString(key, new String[] { arg });
32 public static String getFormattedString(String key, String[] args) {
33 return MessageFormat.format(getString(key), args);