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.
Running NB on JDK 6, if you open jdk7/langtools from OpenJDK as an autoproject, and after setting up various required Ant properties such as boot.java.home in ~/.openjdk/build.properties you run make/build.xml#build, src/share/classes/ is correctly detected as a source root. It is marked with a single error: Source.java gets an error badge (in Projects and editor tab) though it also has a green box when you open it. Switching focus does not fix the problem. Touching the file (e.g. SPACE, DELETE, C-S) does remove the badge, at least until you do a clean build. My log file notes WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: Incorrect error badges detected, file=/space/src/jdk7/langtools/src/share/classes/com/sun/tools/javac/code/Source.java. WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: Going to recompute root=/space/src/jdk7/langtools/src/share/classes, files in error=[file:/space/src/jdk7/langtools/src/share/classes/com/sun/tools/javac/code/Source.java]. SEVERE [org.netbeans.modules.java.source.usages.RepositoryUpdater]: Coupling error: class file jar:file:/space/jdk1.6.0_10/jre/lib/rt.jar!/javax/lang/model/SourceVersion.class, source file file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/SourceVersion.java WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: Incorrect error badges detected, file=/space/src/jdk7/langtools/src/share/classes/com/sun/tools/javac/code/Source.java. WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: Going to recompute root=/space/src/jdk7/langtools/src/share/classes, files in error=[file:/space/src/jdk7/langtools/src/share/classes/com/sun/tools/javac/code/Source.java]. SEVERE [org.netbeans.modules.java.source.usages.RepositoryUpdater]: Coupling error: class file jar:file:/space/jdk1.6.0_10/jre/lib/rt.jar!/javax/lang/model/SourceVersion.class, source file file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/SourceVersion.java Perhaps the reason this one file is problematic is that JDK1_7 is present in Source.java but not in rt.jar? Or SourceVersion.RELEASE_7?
Overtake.
Possibly fixed by fix for issue #161599.
The issue cannot be reproduced using the latest dev build. After running make/build.xml#build, src/share/classes/ is correctly detected as a source root, however, only the packages that comply with the include/exclude rules defined in the 'build-classes-apt' target are visible and scanned (so com.sun.tools.javac.code.Source is not scanned anymore). This behavior follows the autoproject definition stored in autoprojects.properties: /home/balek/wrk/openjdk/langtools/src/share/classes\#binary=/home/balek/wrk/openjdk/langtools/build/classes /home/balek/wrk/openjdk/langtools/src/share/classes\#classpath= /home/balek/wrk/openjdk/langtools/src/share/classes\#excludes=**/package-info.java /home/balek/wrk/openjdk/langtools/src/share/classes\#includes=com/sun/mirror/,com/sun/tools/apt/ /home/balek/wrk/openjdk/langtools/src/share/classes\#source=\ /home/balek/wrk/openjdk/langtools/build/bootstrap/gensrc:\ /home/balek/wrk/openjdk/langtools/src/share/classes:\ /home/balek/wrk/openjdk/langtools/build/gensrc
I will fix the autoproject issue by making it union includes (and intersect excludes) when there is >1 <javac> on a given source root.
...and now (in a dev build) Source.java is not marked with an error badge. So perhaps something was fixed.
I take that back. It is marked with an error badge after restarting the IDE. So are some other classes such as PrintingProcessor. This is using 090811 (86b36ce6f070).
WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: Incorrect error badges detected, file=/space/src/jdk7/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java. WARNING [org.netbeans.modules.java.source.tasklist.IncorrectErrorBadges]: Going to recompute root=/space/src/jdk7/langtools/src/share/classes, files in error=[file:/space/src/jdk7/langtools/src/share/classes/javax/tools/ForwardingJavaFileObject.java, file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java, file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java, file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java, file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java, file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java, file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java, file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java, file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java, file:/space/src/jdk7/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java, file:/space/src/jdk7/langtools/src/share/classes/com/sun/tools/javac/code/Source.java, file:/space/src/jdk7/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java]. and the bad error badges remain.
The problem is that class files contained in the platform's rt.jar are 'newer' than corresponding OpenJDK sources. Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/2a6e4ec07692 changeset 0084dac11bc9 in main/nb-javac details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=0084dac11bc9