Bug 209448 - Enhance ErrorDescription(Factory) with optional ID and more details text
Enhance ErrorDescription(Factory) with optional ID and more details text
Product: editor
Classification: Unclassified
Component: Hints & Annotations
All All
: P3 (vote)
: 7.2
Assigned To: Milutin Kristofic
Depends on:
  Show dependency treegraph
Reported: 2012-03-12 08:43 UTC by Jan Lahoda
Modified: 2013-09-04 13:14 UTC (History)
2 users (show)

See Also:

Proposed API change. (11.59 KB, patch)
2012-03-12 11:25 UTC, Jan Lahoda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2012-03-12 08:43:28 UTC
I would like to enhance ErrorDescription with an optional ID and "more details" text.
Comment 1 Jan Lahoda 2012-03-12 11:25:33 UTC
Created attachment 116594 [details]
Proposed API change.
Comment 2 Jan Lahoda 2012-03-12 11:26:12 UTC
Please review. Thanks.
Comment 3 Tomas Zezula 2012-03-13 16:44:17 UTC
The patch is OK.
Comment 4 Jesse Glick 2012-03-14 23:18:38 UTC
[JG01] The createErrorDescription overloads are becoming unreadably long. Consider using the builder pattern for optional args, e.g.

ErrorDescription e = ErrorDescriptionFactory.make(WARNING, "Bad stuff!", doc, line).id("bad_stuff).details("There is bad stuff here.").fixes(oneFix, anotherFix);
Comment 5 Jan Lahoda 2012-03-15 22:44:37 UTC
JL01: I am thinking about converting the factory into a builder (possibly deprecating the whole ErrorDescriptionFactory and replacing it with ErrorDescriptionBuilder), but I would rather keep the change simple for now. If/when we move to to the builder pattern, deprecating three additional methods shouldn't be too difficult.
Comment 6 Jesse Glick 2012-03-20 03:08:59 UTC
JG01 - OK.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo