1 package org.enhydra.kelp.eclipse.enhydraWizard; 2 3 import java.text.MessageFormat ; 4 import java.util.MissingResourceException ; 5 import java.util.ResourceBundle ; 6 7 15 public class NewEnhydraWizardMessages { 16 17 private static final String RESOURCE_BUNDLE = "org.enhydra.kelp.eclipse.enhydraWizard.messages"; 18 private static ResourceBundle fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); 20 21 22 25 public NewEnhydraWizardMessages() { 26 super(); 27 } 28 29 30 public static String getString(String key) { 31 try { 32 return fgResourceBundle.getString(key); 33 } catch (MissingResourceException e) { 34 return '!' + key + '!'; 35 } 36 } 37 38 43 public static String getFormattedString(String key, Object arg) { 44 return MessageFormat.format(getString(key), new Object [] { arg }); 45 } 46 47 50 public static String getFormattedString(String key, Object [] args) { 51 return MessageFormat.format(getString(key), args); 52 } 53 54 } 55 | Popular Tags |