IPath srcPath = new Path(newSourceLocation);
if (workspaceRoot.findMember(srcPath) != null) {
sourceLocation = newSourceLocation;
} else if (wsRootPath.isPrefixOf(srcPath)) {
int segmentsMatched = wsRootPath.matchingFirstSegments(srcPath);
srcPath = srcPath.removeFirstSegments(segmentsMatched).setDevice(null);
sourceLocation = srcPath.toOSString();
} else {
sourceLocation = newSourceLocation;
relativeToWorkspace = false;
}