diff options
Diffstat (limited to 'org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java')
-rw-r--r-- | org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java index a7347bff9..f54a3ad59 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java @@ -122,9 +122,8 @@ public abstract class ContainerSourceContainer extends CompositeSourceContainer //check sub-folders if ((isFindDuplicates() && fSubfolders) || (sources.isEmpty() && fSubfolders)) { - ISourceContainer[] containers = getSourceContainers(); - for (int i=0; i < containers.length; i++) { - Object[] objects = containers[i].findSourceElements(name); + for (ISourceContainer container : getSourceContainers()) { + Object[] objects = container.findSourceElements(name); if (objects == null || objects.length == 0) { continue; } @@ -172,15 +171,13 @@ public abstract class ContainerSourceContainer extends CompositeSourceContainer if(fSubfolders) { IResource[] resources = getContainer().members(); List<ISourceContainer> list = new ArrayList<>(resources.length); - for (int i = 0; i < resources.length; i++) { - IResource resource = resources[i]; + for (IResource resource : resources) { if (resource.getType() == IResource.FOLDER) { list.add(new FolderSourceContainer((IFolder)resource, fSubfolders)); } } ISourceContainer[] containers = list.toArray(new ISourceContainer[list.size()]); - for (int i = 0; i < containers.length; i++) { - ISourceContainer container = containers[i]; + for (ISourceContainer container : containers) { container.init(getDirector()); } return containers; |