View Javadoc

1   package ui;
2   
3   import java.util.MissingResourceException;
4   import java.util.ResourceBundle;
5   
6   public class Messages {
7   	private static final String BUNDLE_NAME = "ui.resource.text.strings"; //$NON-NLS-1$
8   
9   	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
10  			.getBundle(BUNDLE_NAME);
11  
12  	private Messages() {
13  	}
14  
15  	public static String getString(String key) {
16  		// TODO Auto-generated method stub
17  		try {
18  			return RESOURCE_BUNDLE.getString(key);
19  		} catch (MissingResourceException e) {
20  			return '!' + key + '!';
21  		}
22  	}
23  }