.getEntry();
if (renamedPath.isPrefixOf(entry.getPath())) {
entry = replaceBuildpath(destProjectName,
newBuildPathEntryList, renamedPath, entry);
includePath = new IncludePath(entry,
includePath.getProject());
}
} else if (includePath.getEntry() instanceof IResource) {
IResource oldRes = (IResource) includePath.getEntry();
if (renamedPath.isPrefixOf(oldRes.getFullPath())) {
renamedPath = renamedPath
.removeLastSegments(1)
.append(destProjectName)
.append(oldRes.getFullPath().removeFirstSegments(
renamedPath.segmentCount()));
IResource newRes = null;
if (oldRes.getType() == IResource.FILE) {
newRes = ResourcesPlugin.getWorkspace().getRoot()
.getFile(renamedPath);
} else if (oldRes.getType() == IResource.FOLDER) {
newRes = ResourcesPlugin.getWorkspace().getRoot()
.getFolder(renamedPath);
} else if (oldRes.getType() == IResource.PROJECT) {
newRes = ResourcesPlugin.getWorkspace().getRoot()
.getProject(renamedPath.toString());
}
includePath = new IncludePath(newRes,
includePath.getProject());
}
}
}
return includePath;