1 11 package org.eclipse.ui.wizards.datatransfer; 12 13 import java.text.MessageFormat ; 14 import java.util.MissingResourceException ; 15 import java.util.ResourceBundle ; 16 17 20 class DataTransferMessages { 21 private static final String RESOURCE_BUNDLE= "org.eclipse.ui.wizards.datatransfer.messages"; private static ResourceBundle bundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); 23 private DataTransferMessages(){ 24 } 26 34 public static String format(String key, Object [] args) { 35 return MessageFormat.format(getString(key),args); 36 } 37 45 public static String getString(String key) { 46 try { 47 return bundle.getString(key); 48 } catch (MissingResourceException e) { 49 return key; 50 } 51 } 52 } 53 | Popular Tags |