Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2010 Michael Clay and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html /
 
 package org.eclipse.xtext.ui.editor.folding;
Class that gives access to the folding messages resource bundle.

Author(s):
Michael Clay - Initial contribution and API
public class FoldingMessages {
	private static final String BUNDLE_NAME = "org.eclipse.xtext.ui.editor.folding.FoldingMessages"//$NON-NLS-1$
	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle();
	private FoldingMessages() {
		// no instance
	}

Returns the resource string associated with the given key in the resource bundle. If there isn't any value under the given key, the key is returned.

Parameters:
key the resource key
Returns:
the string
	public static String getString(String key) {
		try {
catch (MissingResourceException e) {
			return '!' + key + '!';
		}
	}

Returns the resource bundle managed by the receiver.

Returns:
the resource bundle
	public static ResourceBundle getResourceBundle() {
	}

Returns the formatted resource string associated with the given key in the resource bundle. MessageFormat is used to format the message. If there isn't any value under the given key, the key is returned.

Parameters:
key the resource key
arg the message argument
Returns:
the string
	public static String getFormattedString(String keyObject arg) {
		return MessageFormat.format(keynew Object[] { arg });
	}
New to GrepCode? Check out our FAQ X