}
assert resource.exists();
if (vcs == null)
continue;
VCSResourceInfo expected = vcs.getResourceInfo(resource);
ResourceInfo found = entry.getValue();
String foundUrl = found.vcsUrl.getValue();
String foundRevision = found.vcsRevision.getValue();
if (found.vcsRevision.update(expected.revision)) {
String msg = format(
Messages.SharedProject_revision_out_of_sync, path,
projectName, foundRevision, expected.revision);
logIllegalStateException(msg);
illegalState = true;
}
if (found.vcsUrl.update(expected.url)) {
String msg = format(Messages.SharedProject_vcs_url_out_of_sync,
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);
}
}