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.internal.console;
11:
12: import java.util.MissingResourceException;
13: import java.util.ResourceBundle;
14:
15: public class ConsoleResourceBundleMessages {
16: private static final String BUNDLE_NAME = "org.eclipse.ui.internal.console.ConsoleResourceBundleMessages"; //$NON-NLS-1$
17:
18: private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
19: .getBundle(BUNDLE_NAME);
20:
21: private ConsoleResourceBundleMessages() {
22: }
23:
24: public static String getString(String key) {
25: try {
26: return RESOURCE_BUNDLE.getString(key);
27: } catch (MissingResourceException e) {
28: return '!' + key + '!';
29: }
30: }
31:
32: public static ResourceBundle getBundle() {
33: return RESOURCE_BUNDLE;
34: }
35: }
|