int remaining = 0;
for (int i = 0; i < projectLength; i++){
if (isCanceled())
return;
JavaProject affectedProject = (JavaProject) this.affectedProjects[i];
IClasspathContainer newContainer = this.respectiveContainers[i];
if (newContainer == null) newContainer = JavaModelManager.CONTAINER_INITIALIZATION_IN_PROGRESS; // 30920 - prevent infinite loop
boolean found = false;
if (JavaProject.hasJavaNature(affectedProject.getProject())){
IClasspathEntry[] rawClasspath = affectedProject.getRawClasspath();
for (int j = 0, cpLength = rawClasspath.length; j <cpLength; j++) {
IClasspathEntry entry = rawClasspath[j];
if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER && entry.getPath().equals(this.containerPath)){
found = true;
break;
}
}
}
if (!found) {
modifiedProjects[i] = null; // filter out this project - does not reference the container path, or isnt't yet Java project
manager.containerPut(affectedProject, this.containerPath, newContainer);
continue;
}
IClasspathContainer oldContainer = manager.containerGet(affectedProject, this.containerPath);
if (oldContainer == JavaModelManager.CONTAINER_INITIALIZATION_IN_PROGRESS) {
oldContainer = null;
}
if ((oldContainer != null && oldContainer.equals(this.respectiveContainers[i]))
|| (oldContainer == this.respectiveContainers[i])/*handle case where old and new containers are null (see bug 149043*/) {
modifiedProjects[i] = null; // filter out this project - container did not change
continue;
}
remaining++;