1 11 12 package org.eclipse.ui.views.tasklist; 13 14 import java.text.MessageFormat ; 15 import java.util.MissingResourceException ; 16 import java.util.ResourceBundle ; 17 18 21 class TaskListMessages { 22 23 private static final String RESOURCE_BUNDLE= "org.eclipse.ui.views.tasklist.messages"; private static ResourceBundle bundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); 25 26 private TaskListMessages(){ 27 } 29 30 38 public static String format(String key, Object [] args) { 39 return MessageFormat.format(getString(key),args); 40 } 41 42 50 public static String getString(String key) { 51 try { 52 return bundle.getString(key); 53 } catch (MissingResourceException e) { 54 return key; 55 } 56 } 57 } 58 | Popular Tags |