Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2018-08-21 06:19:30 -0400
committerLars Vogel2018-08-21 07:30:53 -0400
commit26cd84cf3cb1675a6fa7f658d75e119abe4b442b (patch)
treeae47dbe9db1ecf82cd3810739a73cdba7200c4b0
parentdd032379a2ef577c83bd1b9adca27863e4fea14b (diff)
downloadeclipse.platform.text-26cd84cf3cb1675a6fa7f658d75e119abe4b442b.tar.gz
eclipse.platform.text-26cd84cf3cb1675a6fa7f658d75e119abe4b442b.tar.xz
eclipse.platform.text-26cd84cf3cb1675a6fa7f658d75e119abe4b442b.zip
Use enhanced for loop in HippieCompletionTestI20180821-0800
This is triggered by the save actions Change-Id: Iee638d9fe025ad73f08ce8921d6026f7d500701d Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/HippieCompletionTest.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/HippieCompletionTest.java b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/HippieCompletionTest.java
index 7bce9329b..cdba283d1 100644
--- a/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/HippieCompletionTest.java
+++ b/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/HippieCompletionTest.java
@@ -11,7 +11,10 @@
*******************************************************************************/
package org.eclipse.ui.workbench.texteditor.tests;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.Arrays;
@@ -590,8 +593,7 @@ public class HippieCompletionTest {
private List<String> createSuggestions(String prefix, List<IDocument> docsList) {
ArrayList<String> results= new ArrayList<>();
- for (Iterator<IDocument> i= docsList.iterator(); i.hasNext();) {
- IDocument doc= i.next();
+ for (IDocument doc : docsList) {
try {
results.addAll(fEngine.getCompletionsForward(doc, prefix, 0, false));
} catch (BadLocationException e) {

Back to the top