1 11 package org.eclipse.jdt.internal.ui.text.correction; 12 13 import java.text.MessageFormat ; 14 import java.util.MissingResourceException ; 15 import java.util.ResourceBundle ; 16 17 public final class SerialVersionMessages { 18 19 private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.text.correction.SerialVersionMessages"; 21 private static final ResourceBundle RESOURCE_BUNDLE= ResourceBundle.getBundle(BUNDLE_NAME); 22 23 public static String getFormattedString(String key, Object arg) { 24 return MessageFormat.format(getString(key), new Object [] { arg}); 25 } 26 27 public static String getFormattedString(String key, Object [] args) { 28 return MessageFormat.format(getString(key), args); 29 } 30 31 public static String getString(String key) { 32 try { 33 return RESOURCE_BUNDLE.getString(key); 34 } catch (MissingResourceException e) { 35 return '!' + key + '!'; 36 } 37 } 38 39 private SerialVersionMessages() { 40 } 41 } 42 | Popular Tags |