01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.examples.javaeditor.java;
11:
12: import java.util.MissingResourceException;
13: import java.util.ResourceBundle;
14:
15: public class JavaEditorMessages {
16:
17: private static final String RESOURCE_BUNDLE = "org.eclipse.ui.examples.javaeditor.JavaEditorMessages";//$NON-NLS-1$
18:
19: private static ResourceBundle fgResourceBundle = ResourceBundle
20: .getBundle(RESOURCE_BUNDLE);
21:
22: private JavaEditorMessages() {
23: }
24:
25: public static String getString(String key) {
26: try {
27: return fgResourceBundle.getString(key);
28: } catch (MissingResourceException e) {
29: return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
30: }
31: }
32: }
|