blob: de800759eca40ae0204e9da82a1a7cb50b8c461e [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2012, 2021 Original NatTable authors and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Original NatTable authors and others - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.ecommons.waltable;
import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class Messages {
private static final String BUNDLE_NAME= "org.eclipse.statet.ecommons.waltable.messages"; //$NON-NLS-1$
private static final ResourceBundle RESOURCE_BUNDLE= ResourceBundle.getBundle(BUNDLE_NAME);
private Messages() {
}
public static String getString(final String key) {
try {
return RESOURCE_BUNDLE.getString(key);
} catch (final MissingResourceException e) {
return '!' + key + '!';
}
}
public static String getString (final String key, final Object[] args) {
return MessageFormat.format(RESOURCE_BUNDLE.getString(key), args);
}
}