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 236325 - ProjectProblem.createWarning() and createError() should have a way of not providing resolution
Summary: ProjectProblem.createWarning() and createError() should have a way of not pro...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks: 236164
  Show dependency tree
 
Reported: 2013-09-24 12:55 UTC by Milos Kleint
Modified: 2013-10-09 09:08 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
api related changes (6.66 KB, patch)
2013-10-01 10:51 UTC, Milos Kleint
Details | Diff
all changes done (11.31 KB, patch)
2013-10-01 10:51 UTC, Milos Kleint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Kleint 2013-09-24 12:55:22 UTC
currently providing an automated resolution is required in the ProjectProblemsProvider class and ui. However some problems don't have an automated resolution, but user is given the impression that they can click the Resolve.. button. That however is a noop in such a case.

this issue is a request to provide an api method to create an error/warning without a resolution.
Comment 1 Milos Kleint 2013-10-01 10:51:34 UTC
Created attachment 140682 [details]
api related changes
Comment 2 Milos Kleint 2013-10-01 10:51:51 UTC
Created attachment 140683 [details]
all changes done
Comment 3 Milos Kleint 2013-10-01 10:52:48 UTC
please review this addition to the problem reporting/resolution api.
Comment 4 Tomas Zezula 2013-10-01 16:34:16 UTC
Seems OK to me.
Only one problem:

273	            if (resolver == null) {
274	                return new FutureTask<Result>(new Runnable() {
275	                    @Override
276	                    public void run() {
277	                        //noop
278	                    }
279	                }, Result.create(Status.UNRESOLVED));
280	            }

returns non done future which is not scheduled to any Executor.
The caller of Future<?>.get() will block forever.
just change:

Future<Result> res = new FutureTask<Result>(...);
res.run();
return res;
Comment 5 Milos Kleint 2013-10-09 08:28:09 UTC
thanks for the review, will apply the changes shortly with tzezula's comments applied.
Comment 6 Milos Kleint 2013-10-09 09:08:05 UTC
http://hg.netbeans.org/core-main/rev/951d52e9a0db