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.
When you open a read-only file in the Java source code editor, for instance a class from a class library for which the source code has been configured, the Java editor insists on highlighting any errors it finds in it. Mostly these are errors caused by imports which it cannot find (which cause further errors all down the file for anything for which it couldn't import the type). This is undesirable for several reasons: * It's useless. The file is read-only and represents a class from a class library. You couldn't fix the errors even if you wanted to (and you don't want to, since usually the errors aren't really errors, and it's third-party code anyway). * It's annoying. The source code is peppered with error icons and red squiggly lines that distract and confuse. * It's a performance hit. I don't notice it much, but I'm sure it costs a non-trivial amount of CPU resources to check the file for errors, resources which could be better elsewhere. I therefore propose that the Java source editor switch off its error checking functionality for any read-only files it opens. Or at least that it doesn't show the errors (the semantic analysis would still useful to be able to provide click-through support for members and types which it *can* resolve).
See http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/highlighting/package-summary.html "Use case 5. - Filtering layers used for JTextComponent"