comparison org.eclipse.jface.text/src/org/eclipse/jface/text/JFaceTextMessages.d @ 12:bc29606a740c

Added dwt-addons in original directory structure of eclipse.org
author Frank Benoit <benoit@tionex.de>
date Sat, 14 Mar 2009 18:23:29 +0100
parents
children
comparison
equal deleted inserted replaced
11:43904fec5dca 12:bc29606a740c
1 /*******************************************************************************
2 * Copyright (c) 2000, 2005 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 org.eclipse.jface.text.JFaceTextMessages;
14
15 import java.lang.all;
16
17 import java.util.ResourceBundle;
18 import java.util.MissingResourceException;
19
20 class JFaceTextMessages {
21
22 // private static const String RESOURCE_BUNDLE= "org.eclipse.jface.text.JFaceTextMessages";//$NON-NLS-1$
23
24 private static ResourceBundle fgResourceBundle_;//= ResourceBundle.getBundle(RESOURCE_BUNDLE);
25
26 private static ResourceBundle fgResourceBundle(){
27 if( fgResourceBundle_ is null ){
28 synchronized(JFaceTextMessages.classinfo ){
29 if( fgResourceBundle_ is null ){
30 fgResourceBundle_ = ResourceBundle.getBundle(
31 getImportData!("org.eclipse.jface.text.JFaceTextMessages.properties"));
32 }
33 }
34 }
35 return fgResourceBundle_;
36 }
37
38 private this() {
39 }
40
41 public static String getString(String key) {
42 try {
43 return fgResourceBundle.getString(key);
44 } catch (MissingResourceException e) {
45 return "!" ~ key ~ "!";//$NON-NLS-2$ //$NON-NLS-1$
46 }
47 }
48 }