Removed unnecessary import.
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / overlaypages / Messages.java
1 /*******************************************************************************
2  * Copyright (c) 2003 Berthold Daum.
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.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     Berthold Daum
10  *******************************************************************************/
11
12 package net.sourceforge.phpeclipse.ui.overlaypages;
13
14 import java.util.ResourceBundle;
15
16 public class Messages {
17
18         private final static String RESOURCE_BUNDLE = "net.sourceforge.phpeclipse.ui.overlaypages.Messages";//$NON-NLS-1$
19
20         private static ResourceBundle fgResourceBundle = null;
21
22         private static boolean notRead = true;
23
24         public Messages() {
25         }
26
27         public static ResourceBundle getResourceBundle() {
28                 if (notRead) {
29                         notRead = false;
30                         try {
31                                 fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
32                         } catch (Exception e) {
33                         }
34                 }
35
36                 return fgResourceBundle;
37         }
38
39         public static String getString(String key) {
40                 try {
41                         return getResourceBundle().getString(key);
42                 } catch (Exception e) {
43                         return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
44                 }
45         }
46 }