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
|
|
40 import java.util.ResourceBundle;
|
|
41
|
|
42 import com.ibm.icu.text.MessageFormat;
|
|
43
|
|
44 class TextEditMessages {
|
|
45
|
150
|
46 // private static const String BUNDLE_NAME= "dwtx.text.edits.Messages"; //$NON-NLS-1$
|
|
47
|
|
48 private static const ResourceBundle RESOURCE_BUNDLE;//= ResourceBundle.getBundle(BUNDLE_NAME);
|
129
|
49
|
150
|
50 static this() {
|
|
51 RESOURCE_BUNDLE = ResourceBundle.getBundle(
|
|
52 getImportData!("dwtx.text.edits.TextEditMessages.properties"));
|
|
53 }
|
129
|
54
|
130
|
55 private this() {
|
129
|
56 }
|
|
57
|
|
58 public static String getString(String key) {
|
|
59 try {
|
|
60 return RESOURCE_BUNDLE.getString(key);
|
|
61 } catch (MissingResourceException e) {
|
150
|
62 return '!' ~ key ~ '!';
|
129
|
63 }
|
|
64 }
|
|
65
|
150
|
66 public static String getFormattedString(String key, Object[] args...) {
|
129
|
67 return MessageFormat.format(getString(key), args);
|
|
68 }
|
|
69 }
|