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 219313 - Add support class for ProjectProblemsProvider
Summary: Add support class for ProjectProblemsProvider
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2012-10-02 08:39 UTC by Tomas Mysik
Modified: 2012-10-12 02:07 UTC (History)
6 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
ProjectProblemsProviderSupport (8.65 KB, patch)
2012-10-02 09:47 UTC, Tomas Mysik
Details | Diff
API usage (30.03 KB, patch)
2012-10-02 09:48 UTC, Tomas Mysik
Details | Diff
API (8.84 KB, patch)
2012-10-02 12:50 UTC, Tomas Mysik
Details | Diff
API (8.91 KB, patch)
2012-10-03 08:14 UTC, Tomas Mysik
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2012-10-02 08:39:19 UTC
To avoid code copying (currently in Java, PHP and ClientSide projects) and incorrect synchronization, add support class for ProjectProblemsProvider. It should have similar role as e.g. ChangeSupport class has.

Once I attach patches, I will start an API review.
Comment 1 Tomas Mysik 2012-10-02 09:47:01 UTC
Created attachment 125200 [details]
ProjectProblemsProviderSupport

API change.
Comment 2 Tomas Mysik 2012-10-02 09:48:16 UTC
Created attachment 125201 [details]
API usage

API usage for Java, PHP and ClientSide projects. The diffstat is:
6 files changed, 110 insertions(+), 215 deletions(-)
Comment 3 Tomas Mysik 2012-10-02 09:50:13 UTC
Please review, thanks.
Comment 4 Ondrej Brejla 2012-10-02 10:07:15 UTC
OB01: I think that NetBeans annotations (@NonNull and such) should be used consistently in all methods and their parameters.

OB02: Maybe @author annotation should be used ;)
Comment 5 Tomas Mysik 2012-10-02 12:50:15 UTC
Created attachment 125232 [details]
API

Patch updated.
Comment 6 Tomas Mysik 2012-10-02 12:51:43 UTC
OB01: Fixed.
OB02: Fixed but please notice that the real author of the threading code is Tomas Zezula.
Comment 7 Tomas Zezula 2012-10-02 17:25:26 UTC
Seems good to me.
TZ01: ProjectProblemsProviderSupport.getProblems(...) should return unmodifiable collection.
TZ02(minor): Consider replacement of a new type ProblemsCollector by j.u.c.Callable<Collection<? extends ProjectProblemsProvider.ProjectProblem>>.
Comment 8 Tomas Mysik 2012-10-03 07:58:43 UTC
TZ01: Will do that.
TZ02: I do not have strong opinion but solution with Callable seems to me to be a bit less "user-friendly". Is there any specific reason why to do that?

Thanks.
Comment 9 Tomas Zezula 2012-10-03 08:03:50 UTC
Just to save one class on PermGen, nothing more.
Comment 10 Ondrej Brejla 2012-10-03 08:10:23 UTC
TZ02: I definitely prefer readability and "user-friendly" approach. But it's on Tomas ;)
Comment 11 Tomas Mysik 2012-10-03 08:14:50 UTC
Created attachment 125271 [details]
API

Updated patch (TZ01)
Comment 12 Tomas Mysik 2012-10-03 08:17:29 UTC
TZ02: I will think about it.

Thanks.
Comment 13 Tomas Mysik 2012-10-09 09:16:49 UTC
TZ02: I prefer to keep the interface.

If there are no objections, I will integrate it today or tomorrow.

Thanks for the review.
Comment 15 Quality Engineering 2012-10-10 03:06:37 UTC
Integrated into 'main-golden', will be available in build *201210100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6039e10b7e1a
User: Tomas Mysik <tmysik@netbeans.org>
Log: #219313 - Add support class for ProjectProblemsProvider

API itself.
Comment 16 Jesse Glick 2012-10-10 11:53:41 UTC
Please fix:

nbms-and-javadoc/apisupport.apidocs/build/javadoc/org-netbeans-modules-projectuiapi/apichanges.html:416:78: Broken link: org-netbeans-modules-projectuiapi/org/netbeans/api/project/ui/support/ProjectProblemsProviderSupport.html

<class package="org.netbeans.api.project.ui.support" name="ProjectProblemsProviderSupport"/> is wrong.
Comment 17 Tomas Mysik 2012-10-10 12:23:33 UTC
(In reply to comment #16)
> <class package="org.netbeans.api.project.ui.support"
> name="ProjectProblemsProviderSupport"/> is wrong.

Thanks for catching that, will fix it ASAP.
Comment 18 Tomas Mysik 2012-10-10 13:43:11 UTC
Fixed broken javadoc.

http://hg.netbeans.org/web-main/rev/f1773120f4be
Comment 19 Quality Engineering 2012-10-12 02:07:19 UTC
Integrated into 'main-golden', will be available in build *201210120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f1773120f4be
User: Tomas Mysik <tmysik@netbeans.org>
Log: #219313 cont'd - Add support class for ProjectProblemsProvider

Apichanges fixed.