Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2016-01-31 14:25:10 +0000
committerLars Vogel2016-02-04 11:17:42 +0000
commitc5ff519b79fc9afc70e056f31520d1e220a33713 (patch)
tree7d08ba49bafe187ccf38124f9bb7cbe985dc6fde
parent86d7d066a8cdcbeaa1a8eee30ef8b529893652e3 (diff)
downloadeclipse.platform.text-c5ff519b79fc9afc70e056f31520d1e220a33713.tar.gz
eclipse.platform.text-c5ff519b79fc9afc70e056f31520d1e220a33713.tar.xz
eclipse.platform.text-c5ff519b79fc9afc70e056f31520d1e220a33713.zip
Bug 487191 - Remove unnecessary Message wrapper
org.eclipse.search2.internal.ui.Messages offers a unnecessary abstraction over com.ibm.icu.text.Messages since the later supports varargs since a while Change-Id: Id4a95dac9c86e0350170133fdcc5e022c26730f0 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/Messages.java33
-rw-r--r--org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java7
2 files changed, 5 insertions, 35 deletions
diff --git a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/Messages.java b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/Messages.java
deleted file mode 100644
index cbe662a004a..00000000000
--- a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/Messages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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.search2.internal.ui;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * Helper class to format message strings.
- *
- * @since 3.1
- */
-public class Messages {
-
- public static String format(String message, Object object) {
- return MessageFormat.format(message, new Object[] { object});
- }
-
- public static String format(String message, Object[] objects) {
- return MessageFormat.format(message, objects);
- }
-
- private Messages() {
- // Not for instantiation
- }
-}
diff --git a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java
index 9d7e59cd4b9..97888b059e0 100644
--- a/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java
+++ b/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Lars Vogel <Lars.Vogel@vogella.com> - Bug 487191
*******************************************************************************/
package org.eclipse.search2.internal.ui;
@@ -14,6 +15,8 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import com.ibm.icu.text.MessageFormat;
+
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -358,7 +361,7 @@ public class SearchHistorySelectionDialog extends SelectionDialog {
private void configureHistoryLink() {
int historyLimit= SearchPreferencePage.getHistoryLimit();
- fLink.setText(Messages.format(SearchMessages.SearchHistorySelectionDialog_configure_link_label, new Integer(historyLimit)));
+ fLink.setText(MessageFormat.format(SearchMessages.SearchHistorySelectionDialog_configure_link_label, new Integer(historyLimit)));
}
protected final void validateDialogState() {

Back to the top