diff options
author | Marlo Häring | 2017-07-17 12:09:00 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-07-18 08:30:28 +0000 |
commit | 8773dabab911ce83b5a7a4d9a5661e932a3fea4d (patch) | |
tree | 24f2a49dd3dc1c5edb2fdc1669c2d2e8ad73b25a | |
parent | 0e3e18a515a1b920b47e17e6b20aa25bbf1db363 (diff) | |
download | eclipse.platform.text-8773dabab911ce83b5a7a4d9a5661e932a3fea4d.tar.gz eclipse.platform.text-8773dabab911ce83b5a7a4d9a5661e932a3fea4d.tar.xz eclipse.platform.text-8773dabab911ce83b5a7a4d9a5661e932a3fea4d.zip |
Bug 493299 - Use varargs in packageI20170719-2000I20170719-0600I20170719-0040I20170718-2000
org.eclipse.jface.text.source.JFaceTextMessages.getFormattedString
Change-Id: Idcf8403e364240d5231f9e28400953315304fbf5
Signed-off-by: Marlo Häring <haering@informatik.uni-hamburg.de>
3 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultAnnotationHover.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultAnnotationHover.java index 4e05e156950..14373b0b98e 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultAnnotationHover.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultAnnotationHover.java @@ -90,7 +90,7 @@ public class DefaultAnnotationHover implements IAnnotationHover { } if (fShowLineNumber && lineNumber > -1) - return JFaceTextMessages.getFormattedString("DefaultAnnotationHover.lineNumber", new String[] { Integer.toString(lineNumber + 1) }); //$NON-NLS-1$ + return JFaceTextMessages.getFormattedString("DefaultAnnotationHover.lineNumber", Integer.toString(lineNumber + 1)); //$NON-NLS-1$ return null; } @@ -138,7 +138,7 @@ public class DefaultAnnotationHover implements IAnnotationHover { while (e.hasNext()) { buffer.append('\n'); String listItemText= e.next(); - buffer.append(JFaceTextMessages.getFormattedString("DefaultAnnotationHover.listItem", new String[] { listItemText })); //$NON-NLS-1$ + buffer.append(JFaceTextMessages.getFormattedString("DefaultAnnotationHover.listItem", listItemText)); //$NON-NLS-1$ } return buffer.toString(); } @@ -170,7 +170,7 @@ public class DefaultAnnotationHover implements IAnnotationHover { if (value instanceof List) { @SuppressWarnings("unchecked") List<Object> messages= (List<Object>) value; - if (messages.contains(message)) + if (messages.contains(message)) return true; messages.add(message); diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/JFaceTextMessages.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/JFaceTextMessages.java index 39c19d84efa..f2ce4f57583 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/JFaceTextMessages.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/JFaceTextMessages.java @@ -57,7 +57,7 @@ class JFaceTextMessages { * @return the formatted string * @since 3.0 */ - public static String getFormattedString(String key, Object[] args) { + public static String getFormattedString(String key, Object... args) { String format= null; try { format= fgResourceBundle.getString(key); diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java index 63946a32e1e..5cccb5d81fe 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java @@ -1528,7 +1528,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler { if (overview.length() > 0) { overview.append("\n"); //$NON-NLS-1$ } - overview.append(JFaceTextMessages.getFormattedString("OverviewRulerHeader.toolTipTextEntry", new Object[] {annotationTypeLabel, Integer.valueOf(count)})); //$NON-NLS-1$ + overview.append(JFaceTextMessages.getFormattedString("OverviewRulerHeader.toolTipTextEntry", annotationTypeLabel, Integer.valueOf(count))); //$NON-NLS-1$ } } |