1 11 package org.eclipse.jdt.internal.ui.actions; 12 13 import com.ibm.icu.text.MessageFormat; 14 import java.util.MissingResourceException ; 15 import java.util.ResourceBundle ; 16 17 20 public class FoldingMessages { 21 22 private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.actions.FoldingMessages"; 24 private static final ResourceBundle RESOURCE_BUNDLE= ResourceBundle.getBundle(BUNDLE_NAME); 25 26 private FoldingMessages() { 27 } 29 30 37 public static String getString(String key) { 38 try { 39 return RESOURCE_BUNDLE.getString(key); 40 } catch (MissingResourceException e) { 41 return '!' + key + '!'; 42 } 43 } 44 45 51 public static ResourceBundle getResourceBundle() { 52 return RESOURCE_BUNDLE; 53 } 54 55 64 public static String getFormattedString(String key, Object arg) { 65 return getFormattedString(key, new Object [] { arg }); 66 } 67 68 77 public static String getFormattedString(String key, Object [] args) { 78 return MessageFormat.format(getString(key), args); 79 } 80 } 81 | Popular Tags |