This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Mismatches between scope of sources and binaries not handled well | ||
---|---|---|---|
Product: | java | Reporter: | Jesse Glick <jglick> |
Component: | Source | Assignee: | Tomas Zezula <tzezula> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | misterm |
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 59792 | ||
Attachments: | Sample project |
Description
Jesse Glick
2005-12-11 18:20:34 UTC
Do you have any opinion on this? There may be an additional issue I did not think of when reporting this - when project A depends on project B, and you have both open and rebuild B, you do not want to rescan b.jar (this was a bug in javacore long ago that was fixed and ought not be rebroken). Perhaps it would be acceptable to quickly examine b.jar for its list of classes - assuming that b/src/ contains the same classes, this would not be nearly as expensive as a full scan. But it would still expose javacore to the risk of encountering the JRE crash bug involving deleting or modifying an open JAR (if another clean build takes place while b.jar is being checked). Created attachment 28105 [details]
Sample project
Try the sample project. C1, when built by Ant, can refer to A1 and B1, but not A2. But 1. Uncommenting "new a2.A2();" leaves a green box for the background compiler, even though the Ant build will fail. 2. No code completion is available for B1, Fix Imports does not work on it, etc. Javacore module was replaced by Retouche infrastructure. This bug is not valid in trunk any more. Hold on, did you actually evaluate this against Retouche infrastructure? The problem may just as well apply to it, assuming you did not change the fundamental logic of classpath scanning. Jesse is right, the issue is still valid. Reassigning to retouche. Sources are taken only from projects, libraries are taken as binaries. If you want to sources to be used, create a project from the library. Checking in nbproject/project.xml; /cvs/java/source/nbproject/project.xml,v <-- project.xml new revision: 1.25; previous revision: 1.24 done Checking in src/org/netbeans/api/java/source/ClasspathInfo.java; /cvs/java/source/src/org/netbeans/api/java/source/ClasspathInfo.java,v <-- ClasspathInfo.java new revision: 1.10; previous revision: 1.9 done Checking in src/org/netbeans/modules/java/source/classpath/GlobalSourcePath.java; /cvs/java/source/src/org/netbeans/modules/java/source/classpath/GlobalSourcePath.java,v <-- GlobalSourcePath.java new revision: 1.11; previous revision: 1.10 done "Sources are taken only from projects, libraries are taken as binaries." - I guess by this you mean that libraries with associated sources will still display pop-up Javadoc correctly (and allow Go to Source etc.), but only classes actually present in the JAR are considered. Is this correct? Yes. |