path, projectName, foundUrl, expected.url);
logIllegalStateException(msg);
illegalState = true;
}
}
IResourceVisitor visitor = new IResourceVisitor() {
boolean result = false;
public boolean visit(IResource resource) {
if (resource == null)
return result;
IPath path = resource.getProjectRelativePath();
String assMsg = MessageFormat.format(
Messages.SharedProject_path_is_null, resource);
assert path != null : assMsg;
if (!contains(resource)) {
final String msg = format(
Messages.SharedProject_resource_map_does_not_contain,
projectName, path.toString());
logIllegalStateException(msg);
result = true;
add(resource);
if (vcs != null) {
final VCSResourceInfo info = vcs
.getResourceInfo(resource);
updateRevision(resource, info.revision);
updateVcsUrl(resource, info.url);
}
}
return true;
}
};
try {
project.accept(visitor, IResource.DEPTH_INFINITE,
IContainer.EXCLUDE_DERIVED);
illegalState = illegalState || visitor.visit(null);
} catch (CoreException e) {
return false;
}
return !illegalState;
}