1 package net.sourceforge.phpdt.externaltools.internal.model;
3 /**********************************************************************
4 Copyright (c) 2002 IBM Corp. and others. All rights reserved.
5 This file is made available under the terms of the Common Public License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/legal/cpl-v10.html
10 **********************************************************************/
12 import java.text.MessageFormat;
13 import java.util.MissingResourceException;
14 import java.util.ResourceBundle;
17 * Utility class which helps managing messages
19 public final class ExternalToolsModelMessages {
20 private static final String RESOURCE_BUNDLE = "net.sourceforge.phpdt.externaltools.internal.model.ExternalToolsModelMessages"; //$NON-NLS-1$
22 private static ResourceBundle bundle = ResourceBundle
23 .getBundle(RESOURCE_BUNDLE);
25 private ExternalToolsModelMessages() {
26 // prevent instantiation of class
30 * Returns the formatted message for the given key in the resource bundle.
35 * the message arguments
36 * @return the formatted message
38 public static String format(String key, Object[] args) {
39 return MessageFormat.format(getString(key), args);
43 * Returns the message with the given key in the resource bundle. If there
44 * isn't any value under the given key, the key is returned.
50 public static String getString(String key) {
52 return bundle.getString(key);
53 } catch (MissingResourceException e) {
59 * Returns the resource bundle for the plug-in
61 // public static ResourceBundle getResourceBundle() {