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 179459 - Add ErrorsCache that should allow indexers to simply show errors/warnings in the tasklist and error badges on files/folders/projects
Summary: Add ErrorsCache that should allow indexers to simply show errors/warnings in ...
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: apireviews
Depends on: 179761
Blocks: 173018
  Show dependency tree
Reported: 2010-01-13 09:51 UTC by Jan Lahoda
Modified: 2010-01-25 02:11 UTC (History)
4 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2010-01-13 09:51:49 UTC
I would like to enhance the Indexing API with a cache for errors/warnings. This cache should be filled from indexers, and should show the errors/warnings automatically in the tasklist. Error badges in the projects tab should be also handled automatically by this cache.

Also requires a small enhancement in the csl.api.

Working patch is on:

Implementation may need improvements, but the API should be ready for review. The API changes are in:
Comment 1 Jan Lahoda 2010-01-13 09:55:02 UTC
Adding a new class:
and changing (adding subclass):

Please review. Thanks.
Comment 2 Jaroslav Tulach 2010-01-13 10:43:28 UTC
Well, that was fast! Excellent.

Y01 The Convertor pattern is slightly unusual. It deserves more documentation, for example that it will be called immediately while the method is running, not anytime later (am I right?).

Y02 Except better documentation, you might simplify life of ordinary users by providing other method that would take Iterator<Error>, and define case class Error(ErrorKind,int,String).

Y03 Error.BadgeError might be just Error.Badged or Error.Badgable or something to avoid double Error occurrence

Y04 I don't see change in dependencies of csl.api to request new version of parsing.api

As an addition to our morning discussion: Changing the friends of masterfs this way is OK.
Comment 3 Jan Lahoda 2010-01-15 06:43:23 UTC
Thanks for the comments.

Y01: I improved the javadoc with a claim that the convertor is used only inside the setErrors method invocation ("The methods on the convertor are not invoked after this method finishes."). The javadoc is still somewhat concise - if there is something particular that is missing there, I will be happy to enhance it.

Y02: I think that the ordinary users should use the convertor(s) and that the API should discourage creating wrapping objects for errors. I was able to rewrite the TLIndexer, so that it does not create wrapping objects for errors (untested, and it might be needed to use wrapping objects in TLIndexer eventually).

Y03: I renamed it to Error.Badging - but if someone has a better name, I will be happy to change it.

Y04: csl.api (currently) has an impl. dep. on parsing.api.
Comment 4 Jan Lahoda 2010-01-19 08:09:11 UTC
If there are no objections, I would like to integrate tomorrow.
Comment 5 Jan Lahoda 2010-01-21 02:51:53 UTC
Thanks for the review.
Comment 6 Quality Engineering 2010-01-24 08:36:52 UTC
Integrated into 'main-golden', will be available in build *201001240200* on (upload may still be in progress)
User: Jan Lahoda <>
Log: #179459: introducing ErrorsCache that allows to easily implement error badging.
Comment 7 Tomas Mysik 2010-01-25 02:11:26 UTC
I know that it's a bit late - that's why I'm not reopening this bug - but couldn't we add a yellow icon for warning? Currently, warnings are just ignored.

What do you think, Honzo?