comparison dwtx/jface/text/hyperlink/HyperlinkMessages.d @ 140:26688fec6d23

Following dsss compile errors
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 03:23:46 +0200
parents 7d818bd32d63
children 000f9136b8f7
comparison
equal deleted inserted replaced
139:93a6ec48fd28 140:26688fec6d23
32 import java.util.ResourceBundle; 32 import java.util.ResourceBundle;
33 33
34 34
35 /** 35 /**
36 * Helper class to get NLSed messages. 36 * Helper class to get NLSed messages.
37 * 37 *
38 * @since 3.4 38 * @since 3.4
39 */ 39 */
40 class HyperlinkMessages { 40 class HyperlinkMessages {
41 private static final String BUNDLE_NAME= HyperlinkMessages.class.getName(); 41 // private static final String BUNDLE_NAME= HyperlinkMessages.class.getName();
42 42
43 private static final ResourceBundle RESOURCE_BUNDLE= ResourceBundle.getBundle(BUNDLE_NAME); 43 private static final ResourceBundle RESOURCE_BUNDLE;//= ResourceBundle.getBundle(BUNDLE_NAME);
44 44
45 static this() {
46 RESOURCE_BUNDLE = ResourceBundle.getBundle(
47 getImportData!("dwtx.jface.text.HyperlinkMessages.properties"));
48 }
49
45 private this() { 50 private this() {
46 } 51 }
47 52
48 /** 53 /**
49 * Gets a string from the resource bundle. 54 * Gets a string from the resource bundle.
50 * 55 *
51 * @param key the string used to get the bundle value, must not be 56 * @param key the string used to get the bundle value, must not be
52 * <code>null</code> 57 * <code>null</code>
53 * @return the string from the resource bundle 58 * @return the string from the resource bundle
54 */ 59 */
55 public static String getString(String key) { 60 public static String getString(String key) {
56 try { 61 try {
57 return RESOURCE_BUNDLE.getString(key); 62 return RESOURCE_BUNDLE.getString(key);
58 } catch (MissingResourceException e) { 63 } catch (MissingResourceException e) {
59 return '!' + key + '!'; 64 return '!' ~ key ~ '!';
60 } 65 }
61 } 66 }
62 } 67 }