Here you can find the source of getFormattedMessage(final String pattern, final Object[] arguments)
public static String getFormattedMessage(final String pattern, final Object[] arguments)
//package com.java2s; /******************************************************************************* * Copyright (c) 2012 Martin Reiterer, Matthias Lettmayer. * 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 * /*from w w w . ja v a2 s.com*/ * Contributors: * Martin Reiterer - initial API and implementation * Matthias Lettmayer - added update marker utils to update and get right position of marker (fixed issue 8) * - fixed openEditor() to open an editor and selecting a key (fixed issue 59) ******************************************************************************/ import java.text.MessageFormat; public class Main { public static String getFormattedMessage(final String pattern, final Object[] arguments) { String formattedMessage = ""; final MessageFormat formatter = new MessageFormat(pattern); formattedMessage = formatter.format(arguments); return formattedMessage; } }