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: | Add ErrorsCache that should allow indexers to simply show errors/warnings in the tasklist and error badges on files/folders/projects | ||
---|---|---|---|
Product: | editor | Reporter: | Jan Lahoda <jlahoda> |
Component: | Parsing & Indexing | Assignee: | apireviews <apireviews> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jlahoda, ppisl, rmatous, tmysik |
Priority: | P3 | Keywords: | API, API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
URL: | http://lahoda.info/hgwebdir.cgi/nb-patches/raw-file/tip/task-cache-parsing-api | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | 179761 | ||
Bug Blocks: | 173018 |
Description
Jan Lahoda
2010-01-13 09:51:49 UTC
Adding a new class: parsing.api/src/org/netbeans/modules/parsing/spi/indexing/ErrorsCache.java and changing (adding subclass): csl.api/src/org/netbeans/modules/csl/api/Error.java Please review. Thanks. 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. 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. If there are no objections, I would like to integrate tomorrow. Thanks for the review. http://hg.netbeans.org/jet-main/rev/96f5c992fe4c Integrated into 'main-golden', will be available in build *201001240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/96f5c992fe4c User: Jan Lahoda <jlahoda@netbeans.org> Log: #179459: introducing ErrorsCache that allows to easily implement error badging. 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? |