Mercurial > projects > dwt-addons
annotate dwtx/text/edits/TextEditMessages.d @ 200:eb3414669eb0 default tip
fix for dmd 1.041 and tango 0.99.8
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 28 Mar 2009 03:09:57 +0100 |
parents | 25f1f92fa3df |
children |
rev | line source |
---|---|
129 | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2006 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwtx.text.edits.TextEditMessages; | |
14 | |
131 | 15 import dwtx.text.edits.MultiTextEdit; // packageimport |
16 import dwtx.text.edits.CopySourceEdit; // packageimport | |
17 import dwtx.text.edits.MoveSourceEdit; // packageimport | |
18 import dwtx.text.edits.CopyingRangeMarker; // packageimport | |
19 import dwtx.text.edits.ReplaceEdit; // packageimport | |
20 import dwtx.text.edits.EditDocument; // packageimport | |
21 import dwtx.text.edits.UndoCollector; // packageimport | |
22 import dwtx.text.edits.DeleteEdit; // packageimport | |
23 import dwtx.text.edits.MoveTargetEdit; // packageimport | |
24 import dwtx.text.edits.CopyTargetEdit; // packageimport | |
25 import dwtx.text.edits.TextEditCopier; // packageimport | |
26 import dwtx.text.edits.ISourceModifier; // packageimport | |
27 import dwtx.text.edits.TextEditProcessor; // packageimport | |
28 import dwtx.text.edits.MalformedTreeException; // packageimport | |
29 import dwtx.text.edits.TreeIterationInfo; // packageimport | |
30 import dwtx.text.edits.TextEditVisitor; // packageimport | |
31 import dwtx.text.edits.TextEditGroup; // packageimport | |
32 import dwtx.text.edits.TextEdit; // packageimport | |
33 import dwtx.text.edits.RangeMarker; // packageimport | |
34 import dwtx.text.edits.UndoEdit; // packageimport | |
35 import dwtx.text.edits.InsertEdit; // packageimport | |
36 | |
37 | |
129 | 38 import dwt.dwthelper.utils; |
39 | |
155
8442b6b2da2d
Fix import for ResourceBundle
Frank Benoit <benoit@tionex.de>
parents:
154
diff
changeset
|
40 import dwt.dwthelper.ResourceBundle; |
158 | 41 import dwtx.dwtxhelper.MessageFormat; |
129 | 42 |
43 class TextEditMessages { | |
44 | |
150 | 45 // private static const String BUNDLE_NAME= "dwtx.text.edits.Messages"; //$NON-NLS-1$ |
46 | |
47 private static const ResourceBundle RESOURCE_BUNDLE;//= ResourceBundle.getBundle(BUNDLE_NAME); | |
129 | 48 |
150 | 49 static this() { |
50 RESOURCE_BUNDLE = ResourceBundle.getBundle( | |
51 getImportData!("dwtx.text.edits.TextEditMessages.properties")); | |
52 } | |
129 | 53 |
130 | 54 private this() { |
129 | 55 } |
56 | |
57 public static String getString(String key) { | |
58 try { | |
59 return RESOURCE_BUNDLE.getString(key); | |
60 } catch (MissingResourceException e) { | |
150 | 61 return '!' ~ key ~ '!'; |
129 | 62 } |
63 } | |
64 | |
150 | 65 public static String getFormattedString(String key, Object[] args...) { |
129 | 66 return MessageFormat.format(getString(key), args); |
67 } | |
68 } |