/* | |
* (c) Copyright IBM Corp. 2000, 2001. | |
* All Rights Reserved. | |
*/ | |
package org.eclipse.jdt.internal.core.refactoring; | |
import java.text.MessageFormat; | |
import java.util.MissingResourceException; | |
import java.util.ResourceBundle; | |
public class RefactoringCoreMessages { | |
private static final String RESOURCE_BUNDLE= "org.eclipse.jdt.internal.core.refactoring.refactoring";//$NON-NLS-1$ | |
private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE); | |
private RefactoringCoreMessages() { | |
} | |
public static String getString(String key) { | |
try { | |
return fgResourceBundle.getString(key); | |
} catch (MissingResourceException e) { | |
return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ | |
} | |
} | |
public static String getFormattedString(String key, String arg) { | |
try{ | |
return MessageFormat.format(fgResourceBundle.getString(key), new String[] { arg }); | |
} catch (MissingResourceException e) { | |
return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ | |
} | |
} | |
public static String getFormattedString(String key, Object arg) { | |
try{ | |
return MessageFormat.format(fgResourceBundle.getString(key), new Object[] { arg }); | |
} catch (MissingResourceException e) { | |
return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ | |
} | |
} | |
public static String getFormattedString(String key, String[] args) { | |
try{ | |
return MessageFormat.format(fgResourceBundle.getString(key), args); | |
} catch (MissingResourceException e) { | |
return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ | |
} | |
} | |
public static String getFormattedString(String key, Object[] args) { | |
try{ | |
return MessageFormat.format(fgResourceBundle.getString(key), args); | |
} catch (MissingResourceException e) { | |
return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ | |
} | |
} | |
} |