Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.texinfoparsers/src/org/eclipse/linuxtools/cdt/libhover/texinfoparsers/ParseNewlibTexinfo.java4
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java7
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverLoadJob.java4
3 files changed, 4 insertions, 11 deletions
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.texinfoparsers/src/org/eclipse/linuxtools/cdt/libhover/texinfoparsers/ParseNewlibTexinfo.java b/libhover/org.eclipse.linuxtools.cdt.libhover.texinfoparsers/src/org/eclipse/linuxtools/cdt/libhover/texinfoparsers/ParseNewlibTexinfo.java
index a1904469d5..96043fe20f 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.texinfoparsers/src/org/eclipse/linuxtools/cdt/libhover/texinfoparsers/ParseNewlibTexinfo.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.texinfoparsers/src/org/eclipse/linuxtools/cdt/libhover/texinfoparsers/ParseNewlibTexinfo.java
@@ -19,7 +19,6 @@ import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.EmptyStackException;
-import java.util.Iterator;
import java.util.List;
import java.util.Stack;
import java.util.regex.Matcher;
@@ -160,8 +159,7 @@ public class ParseNewlibTexinfo {
}
private static FunctionDef FindFunctionDef(String name, List<FunctionDef> FDefs) {
- for (Iterator<FunctionDef> iterator = FDefs.iterator(); iterator.hasNext();) {
- FunctionDef k = iterator.next();
+ for (FunctionDef k : FDefs) {
if (k.FunctionName.equals(name)) {
return k;
}
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java
index a6127e4f70..5a5757e982 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHover.java
@@ -19,7 +19,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
@@ -112,8 +111,7 @@ public class LibHover implements ICHelpProvider {
// If user preference is to cache libhover data, then save any un-saved
// library hover data.
if (ps.getBoolean(PreferenceConstants.CACHE_EXT_LIBHOVER)) {
- for (Iterator<LibHoverLibrary> i = libraries.values().iterator(); i.hasNext();) {
- LibHoverLibrary l = i.next();
+ for (LibHoverLibrary l : libraries.values()) {
try {
// Now, output the LibHoverInfo for caching later
IPath locationDir = locationBase;
@@ -661,8 +659,7 @@ public class LibHover implements ICHelpProvider {
LibHoverInfo cppInfo = l.getHoverInfo();
SortedMap<String, FunctionInfo> map = cppInfo.functions.tailMap(prefix);
Set<Map.Entry<String, FunctionInfo>> c = map.entrySet();
- for (Iterator<Entry<String, FunctionInfo>> i = c.iterator(); i.hasNext();) {
- Map.Entry<String, FunctionInfo> e = i.next();
+ for (Entry<String, FunctionInfo> e : c) {
FunctionInfo x = e.getValue();
String name = x.getName();
// Look for names that start with prefix, but ignore names that
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverLoadJob.java b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverLoadJob.java
index 11ac06ce0a..41ac954061 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverLoadJob.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover/src/org/eclipse/linuxtools/internal/cdt/libhover/LibHoverLoadJob.java
@@ -13,7 +13,6 @@
package org.eclipse.linuxtools.internal.cdt.libhover;
import java.util.Collection;
-import java.util.Iterator;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -35,8 +34,7 @@ public class LibHoverLoadJob extends Job {
monitor.worked(1);
LibHover.getLibHoverDocs();
Collection<LibHoverLibrary> c = LibHover.getLibraries();
- for (Iterator<LibHoverLibrary> i = c.iterator(); i.hasNext();) {
- LibHoverLibrary l = i.next();
+ for (LibHoverLibrary l : c) {
l.getHoverInfo();
}
monitor.done();

Back to the top