1 11 package org.eclipse.core.internal.databinding; 12 13 import java.util.MissingResourceException ; 14 import java.util.ResourceBundle ; 15 16 import com.ibm.icu.text.MessageFormat; 17 18 22 public class BindingMessages { 23 24 27 private static final ResourceBundle bundle = ResourceBundle 28 .getBundle("org.eclipse.core.internal.databinding.messages"); 30 33 public static final String INDEX_OUT_OF_RANGE = "IndexOutOfRange"; 35 38 public static final String MULTIPLE_PROBLEMS = "MultipleProblems"; 40 49 public static String getString(String key) { 50 try { 51 return bundle.getString(key); 52 } catch (MissingResourceException e) { 53 return key; 54 } 55 } 56 57 65 public static String formatString(String key, Object [] arguments) { 66 try { 67 return MessageFormat.format(bundle.getString(key), arguments); 68 } catch (MissingResourceException e) { 69 return key; 70 } 71 } 72 } 73 | Popular Tags |