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.

Bug 160746 - Java editor should not highlight errors for read-only files
Summary: Java editor should not highlight errors for read-only files
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 3 votes (vote)
Assignee: Dusan Balek
Depends on:
Reported: 2009-03-20 15:59 UTC by pepijn
Modified: 2016-10-24 20:12 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description pepijn 2009-03-20 16:00:00 UTC
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).
Comment 1 markiewb 2016-10-24 20:12:21 UTC

"Use case 5. - Filtering layers used for JTextComponent"