JavaProject javaProject,
SimpleLookupTable binaryLocationsPerProject) throws CoreException {
+ /* Update cycle marker */
+ IMarker cycleMarker = javaProject.getCycleMarker();
+ if (cycleMarker != null) {
+ int severity = JavaCore.ERROR.equals(javaProject.getOption(JavaCore.CORE_CIRCULAR_CLASSPATH, true))
+ ? IMarker.SEVERITY_ERROR
+ : IMarker.SEVERITY_WARNING;
+ if (severity != ((Integer) cycleMarker.getAttribute(IMarker.SEVERITY)).intValue())
+ cycleMarker.setAttribute(IMarker.SEVERITY, severity);
+ }
+
/* Update incomplete classpath marker */
- IClasspathEntry[] classpathEntries = javaProject.getExpandedClasspath(true, true);
-
- /* Update cycle marker */
- IMarker cycleMarker = javaProject.getCycleMarker();
- if (cycleMarker != null) {
- int severity = JavaCore.ERROR.equals(javaProject.getOption(JavaCore.CORE_CIRCULAR_CLASSPATH, true))
- ? IMarker.SEVERITY_ERROR
- : IMarker.SEVERITY_WARNING;
- if (severity != ((Integer) cycleMarker.getAttribute(IMarker.SEVERITY)).intValue())
- cycleMarker.setAttribute(IMarker.SEVERITY, severity);
- }
-
+// IClasspathEntry[] classpathEntries = javaProject.getExpandedClasspath(true, true);
+ IClasspathEntry[] classpathEntries = javaProject.getExpandedClasspath(true/*ignore unresolved variable*/, false/*don't create markers*/, null/*preferred cp*/, null/*preferred output*/);
+
ArrayList sLocations = new ArrayList(classpathEntries.length);
ArrayList bLocations = new ArrayList(classpathEntries.length);
nextEntry : for (int i = 0, l = classpathEntries.length; i < l; i++) {
switch(entry.getEntryKind()) {
case IClasspathEntry.CPE_SOURCE :
if (!(target instanceof IContainer)) continue nextEntry;
- IPath outputPath = entry.getOutputLocation() != null
- ? entry.getOutputLocation()
- : javaProject.getOutputLocation();
- IContainer outputFolder;
- if (outputPath.segmentCount() == 1) {
- outputFolder = javaProject.getProject();
- } else {
- outputFolder = root.getFolder(outputPath);
- if (!outputFolder.exists())
- createFolder(outputFolder);
- }
+// IPath outputPath = entry.getOutputLocation() != null
+// ? entry.getOutputLocation()
+// : javaProject.getOutputLocation();
+ IContainer outputFolder = null;
+// if (outputPath.segmentCount() == 1) {
+// outputFolder = javaProject.getProject();
+// } else {
+// outputFolder = root.getFolder(outputPath);
+// if (!outputFolder.exists())
+// createFolder(outputFolder);
+// }
sLocations.add(
ClasspathLocation.forSourceFolder((IContainer) target, outputFolder, entry.fullExclusionPatternChars()));
continue nextEntry;
// IResource resource = (IResource) target;
// ClasspathLocation bLocation = null;
// if (resource instanceof IFile) {
-// if (!(Util.isArchiveFileName(path.lastSegment())))
+// if (!(ProjectPrefUtil.isArchiveFileName(path.lastSegment())))
// continue nextEntry;
// bLocation = ClasspathLocation.forLibrary((IFile) resource);
// } else if (resource instanceof IContainer) {
// binaryLocationsPerProject.put(p, existingLocations);
// }
// } else if (target instanceof File) {
-// if (!(Util.isArchiveFileName(path.lastSegment())))
+// if (!(ProjectPrefUtil.isArchiveFileName(path.lastSegment())))
// continue nextEntry;
// bLocations.add(ClasspathLocation.forLibrary(path.toString()));
// }
// collect the output folders, skipping duplicates
next : for (int i = 0, l = sourceLocations.length; i < l; i++) {
ClasspathMultiDirectory md = sourceLocations[i];
- IPath outputPath = md.binaryFolder.getFullPath();
- for (int j = 0; j < i; j++) { // compare against previously walked source folders
- if (outputPath.equals(sourceLocations[j].binaryFolder.getFullPath())) {
- md.hasIndependentOutputFolder = sourceLocations[j].hasIndependentOutputFolder;
- continue next;
- }
- }
+// IPath outputPath = md.binaryFolder.getFullPath();
+// for (int j = 0; j < i; j++) { // compare against previously walked source folders
+// if (outputPath.equals(sourceLocations[j].binaryFolder.getFullPath())) {
+// md.hasIndependentOutputFolder = sourceLocations[j].hasIndependentOutputFolder;
+// continue next;
+// }
+// }
outputFolders.add(md);
// also tag each source folder whose output folder is an independent folder & is not also a source folder
- for (int j = 0, m = sourceLocations.length; j < m; j++)
- if (outputPath.equals(sourceLocations[j].sourceFolder.getFullPath()))
- continue next;
+// for (int j = 0, m = sourceLocations.length; j < m; j++)
+// if (outputPath.equals(sourceLocations[j].sourceFolder.getFullPath()))
+// continue next;
md.hasIndependentOutputFolder = true;
}
}