Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2012-04-20 18:08:49 -0400
committerAlexander Kurtakov2012-04-20 18:08:49 -0400
commitfabecfd6c2e67c1511f07f0d8ade8cf826b63595 (patch)
tree85081de911dd9b851b7c89df88110294a2ca3886 /libhover
parent88677edc35b0faff27e4ba3a2bdf93dd59956503 (diff)
downloadorg.eclipse.linuxtools-fabecfd6c2e67c1511f07f0d8ade8cf826b63595.tar.gz
org.eclipse.linuxtools-fabecfd6c2e67c1511f07f0d8ade8cf826b63595.tar.xz
org.eclipse.linuxtools-fabecfd6c2e67c1511f07f0d8ade8cf826b63595.zip
Use foreach for shorter code.
Diffstat (limited to 'libhover')
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpToc.java3
-rw-r--r--libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LibHoverPreferencePage.java4
2 files changed, 2 insertions, 5 deletions
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpToc.java b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpToc.java
index 61acd7902a..c45f47ac83 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpToc.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/DevHelpToc.java
@@ -69,8 +69,7 @@ public class DevHelpToc implements IToc {
}
});
- for (int i = 0; i < files.length; ++i) {
- IFileStore file = files[i];
+ for (IFileStore file: files) {
String name = file.fetchInfo().getName();
ITopic topic = new DevHelpTopic(name);
topics.add(topic);
diff --git a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LibHoverPreferencePage.java b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LibHoverPreferencePage.java
index 3def7e8e5a..6f34b352ee 100644
--- a/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LibHoverPreferencePage.java
+++ b/libhover/org.eclipse.linuxtools.cdt.libhover.devhelp/src/org/eclipse/linuxtools/internal/cdt/libhover/devhelp/preferences/LibHoverPreferencePage.java
@@ -16,7 +16,6 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.Collection;
-import java.util.Iterator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -100,8 +99,7 @@ public class LibHoverPreferencePage
LibHoverInfo hover = p.parse(monitor);
// Update the devhelp library info if it is on library list
Collection<LibHoverLibrary> libs = LibHover.getLibraries();
- for (Iterator<LibHoverLibrary> i = libs.iterator(); i.hasNext();) {
- LibHoverLibrary l = i.next();
+ for (LibHoverLibrary l : libs) {
if (l.getName().equals("devhelp")) { //$NON-NLS-1$
l.setHoverinfo(hover);
break;

Back to the top