023315b3af2ea7011084ff78caf8be0167b33a75
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.news / src / net / sourceforge / phpeclipse / news / Messages.java
1 /*******************************************************************************
2  * Copyright (c) 2004 Jérôme Nègre.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.jnegre.org/cpl1_0.html
7  * 
8  * Contributors:
9  *     Jérôme Nègre - initial API and implementation
10  *******************************************************************************/
11
12 /*
13  * Created on 27 juil. 2004
14  */
15 package net.sourceforge.phpeclipse.news;
16
17 import java.util.MissingResourceException;
18 import java.util.ResourceBundle;
19
20 /**
21  * @author Jérôme Nègre
22  */
23 public class Messages {
24         private static final String BUNDLE_NAME = "net.sourceforge.phpeclipse.news.messages";//$NON-NLS-1$
25
26         private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
27                         .getBundle(BUNDLE_NAME);
28
29         private Messages() {
30         }
31
32         public static String getString(String key) {
33                 try {
34                         return RESOURCE_BUNDLE.getString(key);
35                 } catch (MissingResourceException e) {
36                         return '!' + key + '!';
37                 }
38         }
39 }