aboutsummaryrefslogtreecommitdiff
path: root/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Messages.java
diff options
context:
space:
mode:
Diffstat (limited to 'basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Messages.java')
-rw-r--r--basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Messages.java75
1 files changed, 75 insertions, 0 deletions
diff --git a/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Messages.java b/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Messages.java
new file mode 100644
index 0000000..615d686
--- /dev/null
+++ b/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Messages.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 IBM Corporation 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
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.test.performance.ui;
+
+import java.text.MessageFormat;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.test.performance.ui.messages";//$NON-NLS-1$
+
+ private Messages() {
+ // Do not instantiate
+ }
+
+ public static String standardError;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ /**
+ * Bind the given message's substitution locations with the given string values.
+ *
+ * @param message the message to be manipulated
+ * @return the manipulated String
+ */
+ public static String bind(String message) {
+ return bind(message, null);
+ }
+
+ /**
+ * Bind the given message's substitution locations with the given string values.
+ *
+ * @param message the message to be manipulated
+ * @param binding the object to be inserted into the message
+ * @return the manipulated String
+ */
+ public static String bind(String message, Object binding) {
+ return bind(message, new Object[] {binding});
+ }
+
+ /**
+ * Bind the given message's substitution locations with the given string values.
+ *
+ * @param message the message to be manipulated
+ * @param binding1 An object to be inserted into the message
+ * @param binding2 A second object to be inserted into the message
+ * @return the manipulated String
+ */
+ public static String bind(String message, Object binding1, Object binding2) {
+ return bind(message, new Object[] {binding1, binding2});
+ }
+
+ /**
+ * Bind the given message's substitution locations with the given string values.
+ *
+ * @param message the message to be manipulated
+ * @param bindings An array of objects to be inserted into the message
+ * @return the manipulated String
+ */
+ public static String bind(String message, Object[] bindings) {
+ return MessageFormat.format(message, bindings);
+ }
+
+}