Bug 192449 - [javadoc][assist] SelectionJavadocParser should not report problems
Summary: [javadoc][assist] SelectionJavadocParser should not report problems
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: Eric Jodet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-13 10:08 EDT by Frederic Fusier CLA
Modified: 2007-10-29 07:38 EDT (History)
3 users (show)

See Also:


Attachments
[proposed patch] (7.18 KB, patch)
2007-07-11 09:57 EDT, Eric Jodet CLA
no flags Details | Diff
same patch synchronized with HEAD v808 (7.18 KB, patch)
2007-08-28 07:03 EDT, Eric Jodet CLA
no flags Details | Diff
[proposed patch + test case] on top v811 - all jdt.core tests OK (12.08 KB, patch)
2007-09-13 02:30 EDT, Eric Jodet CLA
no flags Details | Diff
[proposed patch + test case] on top v813 - all jdt.core tests OK (23.85 KB, text/file)
2007-09-21 06:19 EDT, Eric Jodet CLA
no flags Details
[proposed patch + test case] on top v814 - all jdt.core tests OK (27.28 KB, patch)
2007-09-24 04:39 EDT, Eric Jodet CLA
no flags Details | Diff
[proposed patch + test case] on top v815 - all jdt.core tests OK (25.04 KB, patch)
2007-09-26 07:57 EDT, Eric Jodet CLA
no flags Details | Diff
[proposed patch + test case] on top v815 - all jdt.core tests OK (19.79 KB, patch)
2007-09-27 02:32 EDT, Eric Jodet CLA
no flags Details | Diff
[proposed patch + test case] on top v815 - all jdt.core tests OK (17.12 KB, patch)
2007-09-28 07:10 EDT, Eric Jodet CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2007-06-13 10:08:27 EDT
SelectionJavadocParser reports problems since this class has been created although it seems not to be really necessary to do so. Not sure if this would increase performance but I guess this could help a little bit...
Comment 1 Eric Jodet CLA 2007-07-11 09:57:14 EDT
Created attachment 73534 [details]
[proposed patch]
Comment 2 Eric Jodet CLA 2007-07-11 10:00:45 EDT
(In reply to comment #1)
Fix + test case - all jdt.core tests ok
Comment 3 Eric Jodet CLA 2007-08-28 07:03:47 EDT
Created attachment 77115 [details]
same patch synchronized with HEAD v808
Comment 4 Eric Jodet CLA 2007-08-31 04:49:18 EDT
(In reply to comment #3)
Frederic, Jerome, David: please review proposed patch
Comment 5 Frederic Fusier CLA 2007-08-31 07:15:35 EDT
(In reply to comment #4)
> (In reply to comment #3)
> Frederic, Jerome, David: please review proposed patch
> 
OK for me. Perhaps David may advice to add some tests for this?
Comment 6 Jerome Lanneluc CLA 2007-08-31 10:02:41 EDT
Patch looks good to me. I agree that it needs regression tests before being committed.
Comment 7 Eric Jodet CLA 2007-08-31 10:21:32 EDT
(In reply to comment #6)
David: requesting your assistance to elaborate test cases. Thanks.
Comment 8 Eric Jodet CLA 2007-09-13 02:30:38 EDT
Created attachment 78276 [details]
[proposed patch + test case] on top v811 - all jdt.core tests OK

improved fix + test case (David: thanks for your help on this one)
May you please review? Thanks.
Comment 9 Jerome Lanneluc CLA 2007-09-19 07:48:48 EDT
(In reply to comment #8)
I would use a toString() representation of the problems instead of using assertFalse(res.hasProblems()). This allows a better debugging if a problem is introduced. You might want to refactor org.eclipse.jdt.core.tests.compiler.regression.Requestor#acceptResult(...) so as to extract the problemLog computing.

Comment 10 Eric Jodet CLA 2007-09-21 06:19:49 EDT
Created attachment 78959 [details]
[proposed patch + test case] on top v813 - all jdt.core tests OK

(In reply to comment #9)
new test case as suggested - please review - thanks.
Comment 11 Eric Jodet CLA 2007-09-24 04:39:38 EDT
Created attachment 79054 [details]
[proposed patch + test case] on top v814 - all jdt.core tests OK

refactor Requestor#acceptResult(CompilationResult) as suggested in comment #9
Comment 12 Jerome Lanneluc CLA 2007-09-24 06:24:39 EDT
(In reply to comment #11)
This patch looks good to me.
Comment 13 Frederic Fusier CLA 2007-09-24 08:01:49 EDT
(In reply to comment #11)
> Created an attachment (id=79054) [details]
> [proposed patch + test case] on top v814 - all jdt.core tests OK
> 
> refactor Requestor#acceptResult(CompilationResult) as suggested in comment #9
> 
This patch changes the behavior for DocCommentParser while reporting problems.
The default is now true (as shouldReportProblems is initialized to true) although it's currently false (as sourceParser == null).

I would also prefer not to have a method to set reportProblem on JavadocParser. I think its content should be inlined systematically to minimize performances impact of this change.

Finally, looking at this, I realized that, in my previous review, I missed the fact that shouldReportProblems was specific to javadoc parsers and did not concern DocCommentParser... So, perhaps this field should be implemented in JavadocParser instead.
Comment 14 Eric Jodet CLA 2007-09-26 07:57:58 EDT
Created attachment 79197 [details]
[proposed patch + test case] on top v815 - all jdt.core tests OK

as per comment #13 remarks / suggestion (well done Frederic)
Also, new method int the JavadocParser was removed: inlined (duplicate) code was preferred for performance reasons.
May reviewers please review proposed patch? Thanks.
Comment 15 Eric Jodet CLA 2007-09-27 02:32:45 EDT
Created attachment 79265 [details]
[proposed patch + test case] on top v815 - all jdt.core tests OK

no modification in jdt.core
Modified tests.compiler as per Frederic buddy check
Comment 16 Eric Jodet CLA 2007-09-28 07:10:11 EDT
Created attachment 79366 [details]
[proposed patch + test case] on top v815 - all jdt.core tests OK

final version
Comment 17 Frederic Fusier CLA 2007-09-28 09:24:39 EDT
(In reply to comment #16)
> Created an attachment (id=79366) [details]
> [proposed patch + test case] on top v815 - all jdt.core tests OK
> 
> final version
> 
Patch looks good: +1
Comment 18 Jerome Lanneluc CLA 2007-10-01 05:46:57 EDT
(In reply to comment #16)
Patch still looks good to me.
Comment 19 Eric Jodet CLA 2007-10-04 09:06:02 EDT
Released for 3.4M3 in HEAD stream
Comment 20 David Audel CLA 2007-10-29 07:38:03 EDT
Verified for 3.4M3 using I20071029-0010 build.