From bcf7ea67a02571e315259739806714a0e995ee6d Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Wed, 8 Dec 2010 00:24:08 +0000 Subject: [PATCH] Loop enhancement. --- .../internal/core/sourcelookup/SourceUtils.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java index 38b831a90df..c6e744da565 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java @@ -152,17 +152,17 @@ public class SourceUtils { } private static boolean isEmpty(String string) { - return (string == null || string.trim().length() == 0); + return string == null || string.trim().length() == 0; } static public ISourceContainer[] convertSourceLocations(ICSourceLocation[] locations) { ArrayList containers = new ArrayList(locations.length); int mappingCount = 0; - for (int i = 0; i < locations.length; ++i) { - if (locations[i] instanceof IProjectSourceLocation) { - containers.add(new ProjectSourceContainer(((IProjectSourceLocation)locations[i]).getProject(), false)); - } else if (locations[i] instanceof IDirectorySourceLocation) { - IDirectorySourceLocation d = (IDirectorySourceLocation)locations[i]; + for (ICSourceLocation location : locations) { + if (location instanceof IProjectSourceLocation) { + containers.add(new ProjectSourceContainer(((IProjectSourceLocation) location).getProject(), false)); + } else if (location instanceof IDirectorySourceLocation) { + IDirectorySourceLocation d = (IDirectorySourceLocation) location; IPath a = d.getAssociation(); if (a != null) { MappingSourceContainer mapping = new MappingSourceContainer(InternalSourceLookupMessages.SourceUtils_0 + (++mappingCount));