1 11 12 package org.eclipse.ui.views.properties; 13 14 import java.text.MessageFormat ; 15 import java.util.MissingResourceException ; 16 import java.util.ResourceBundle ; 17 18 21 class PropertiesMessages { 22 private static final String RESOURCE_BUNDLE= "org.eclipse.ui.views.properties.messages"; private static ResourceBundle bundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); 24 25 private PropertiesMessages(){ 26 } 28 36 public static String format(String key, Object [] args) { 37 return MessageFormat.format(getString(key),args); 38 } 39 47 public static String getString(String key) { 48 try { 49 return bundle.getString(key); 50 } catch (MissingResourceException e) { 51 return key; 52 } 53 } 54 } 55 | Popular Tags |