if (externalPath == null)
return null;
-// if (JavaModelManager.VERBOSE) {
-// System.out.println("JAVA MODEL - Canonicalizing " + externalPath.toString()); //$NON-NLS-1$
-// }
+ if (JavaModelManager.VERBOSE) {
+ System.out.println("JAVA MODEL - Canonicalizing " + externalPath.toString()); //$NON-NLS-1$
+ }
if (IS_CASE_SENSITIVE) {
-// if (JavaModelManager.VERBOSE) {
-// System.out.println("JAVA MODEL - Canonical path is original path (file system is case sensitive)"); //$NON-NLS-1$
-// }
+ if (JavaModelManager.VERBOSE) {
+ System.out.println("JAVA MODEL - Canonical path is original path (file system is case sensitive)"); //$NON-NLS-1$
+ }
return externalPath;
}
IWorkspace workspace = ResourcesPlugin.getWorkspace();
if (workspace == null) return externalPath; // protection during shutdown (30487)
if (workspace.getRoot().findMember(externalPath) != null) {
-// if (JavaModelManager.VERBOSE) {
-// System.out.println("JAVA MODEL - Canonical path is original path (member of workspace)"); //$NON-NLS-1$
-// }
+ if (JavaModelManager.VERBOSE) {
+ System.out.println("JAVA MODEL - Canonical path is original path (member of workspace)"); //$NON-NLS-1$
+ }
return externalPath;
}
new Path(new File(externalPath.toOSString()).getCanonicalPath());
} catch (IOException e) {
// default to original path
-// if (JavaModelManager.VERBOSE) {
-// System.out.println("JAVA MODEL - Canonical path is original path (IOException)"); //$NON-NLS-1$
-// }
+ if (JavaModelManager.VERBOSE) {
+ System.out.println("JAVA MODEL - Canonical path is original path (IOException)"); //$NON-NLS-1$
+ }
return externalPath;
}
int canonicalLength = canonicalPath.segmentCount();
if (canonicalLength == 0) {
// the java.io.File canonicalization failed
-// if (JavaModelManager.VERBOSE) {
-// System.out.println("JAVA MODEL - Canonical path is original path (canonical path is empty)"); //$NON-NLS-1$
-// }
+ if (JavaModelManager.VERBOSE) {
+ System.out.println("JAVA MODEL - Canonical path is original path (canonical path is empty)"); //$NON-NLS-1$
+ }
return externalPath;
} else if (externalPath.isAbsolute()) {
result = canonicalPath;
if (canonicalLength >= externalLength) {
result = canonicalPath.removeFirstSegments(canonicalLength - externalLength);
} else {
-// if (JavaModelManager.VERBOSE) {
-// System.out.println("JAVA MODEL - Canonical path is original path (canonical path is " + canonicalPath.toString() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
-// }
+ if (JavaModelManager.VERBOSE) {
+ System.out.println("JAVA MODEL - Canonical path is original path (canonical path is " + canonicalPath.toString() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
return externalPath;
}
}
if (externalPath.getDevice() == null) {
result = result.setDevice(null);
}
-// if (JavaModelManager.VERBOSE) {
-// System.out.println("JAVA MODEL - Canonical path is " + result.toString()); //$NON-NLS-1$
-// }
+ if (JavaModelManager.VERBOSE) {
+ System.out.println("JAVA MODEL - Canonical path is " + result.toString()); //$NON-NLS-1$
+ }
return result;
}