1 /*
2 * Created on Jan 19, 2004
3 *
4 * Copyright (C) 2004 Sean Ruff
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20 package org.un4gvn.editorviewer.internal;
21
22 import java.util.MissingResourceException;
23 import java.util.ResourceBundle;
24
25 /***
26 * Retrieve properties from resource bundle
27 */
28 public class Messages {
29
30 private static final String BUNDLE_NAME = "org.un4gvn.editorviewer.internal.editorviewer"; //$NON-NLS-1$
31
32 private static final ResourceBundle RESOURCE_BUNDLE =
33 ResourceBundle.getBundle(BUNDLE_NAME);
34
35 /***
36 *
37 */
38 private Messages() {}
39
40 /***
41 * @param key
42 * @return
43 */
44 public static String getString(String key) {
45 try {
46 return RESOURCE_BUNDLE.getString(key);
47 } catch (MissingResourceException e) {
48 return '!' + key + '!';
49 }
50 }
51 }
This page was automatically generated by Maven