Added
Link Here
|
1 |
package org.eclipse.wst.jsdt.core; |
2 |
|
3 |
import java.util.MissingResourceException; |
4 |
import java.util.ResourceBundle; |
5 |
|
6 |
import com.ibm.icu.text.MessageFormat; |
7 |
|
8 |
public class Messages { |
9 |
private static final String BUNDLE_NAME = "org.eclipse.wst.jsdt.core.messages"; //$NON-NLS-1$ |
10 |
|
11 |
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle |
12 |
.getBundle(BUNDLE_NAME); |
13 |
|
14 |
private Messages() { |
15 |
} |
16 |
|
17 |
public static String getString(String key, Object[] objects) { |
18 |
try { |
19 |
return MessageFormat.format( RESOURCE_BUNDLE.getString(key), objects); |
20 |
} catch (MissingResourceException e) { |
21 |
return '!' + key + '!'; |
22 |
} |
23 |
} |
24 |
} |