Mercurial > projects > dwt-addons
comparison dwtx/jface/text/RegExMessages.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 | 25f1f92fa3df |
comparison
equal
deleted
inserted
replaced
139:93a6ec48fd28 | 140:26688fec6d23 |
---|---|
155 | 155 |
156 | 156 |
157 import dwt.dwthelper.utils; | 157 import dwt.dwthelper.utils; |
158 | 158 |
159 | 159 |
160 import java.util.MissingResourceException; | 160 import dwt.dwthelper.MissingResourceException; |
161 import java.util.ResourceBundle; | 161 import dwt.dwthelper.ResourceBundle; |
162 | 162 |
163 | 163 |
164 /** | 164 /** |
165 * RegEx messages. Helper class to get NLSed messages. | 165 * RegEx messages. Helper class to get NLSed messages. |
166 * | 166 * |
167 * @since 3.4 | 167 * @since 3.4 |
168 */ | 168 */ |
169 final class RegExMessages { | 169 final class RegExMessages { |
170 | |
171 private static final String RESOURCE_BUNDLE= RegExMessages.class.getName(); | |
172 private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE); | |
173 | 170 |
171 //private static const String RESOURCE_BUNDLE= RegExMessages.class.getName(); | |
172 private static ResourceBundle fgResourceBundle;//= ResourceBundle.getBundle(RESOURCE_BUNDLE); | |
173 | |
174 static this() { | |
175 fgResourceBundle = ResourceBundle.getBundle( | |
176 getImportData!("dwtx.jface.text.RegExMessages.properties")); | |
177 } | |
174 | 178 |
175 private this() { | 179 private this() { |
176 // Do not instantiate | 180 // Do not instantiate |
177 } | 181 } |
178 | 182 |
179 public static String getString(String key) { | 183 public static String getString(String key) { |
180 try { | 184 try { |
181 return fgResourceBundle.getString(key); | 185 return fgResourceBundle.getString(key); |
182 } catch (MissingResourceException e) { | 186 } catch (MissingResourceException e) { |
183 return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ | 187 return "!" ~ key ~ "!";//$NON-NLS-2$ //$NON-NLS-1$ |
184 } | 188 } |
185 } | 189 } |
186 | 190 |
187 } | 191 } |