Community
Participate
Working Groups
If I have something like below, the IDE complains that {@link X} is bad, but I don't think it really is bad because the IDE suggests it when I type {@link and I hit ctrl-space. Since EMF generates code that produces references like this, it would be awfully nice for it to be fixed. If it actually is bad, I need to change the code generator not to produce it, so please let me know. /** * The return type {@link X} and that is all. * @param <X> * @param t * @return something. */ public <X> X foooo(X t) { return null; }
Javadoc warnings are set by the compiler.
Eric, can you investigate?
(In reply to comment #2) (sorry for the late answer - either I missed the bugzilla notification or did not receive it) We currently behave as Javadoc which rejects the {@link X} syntax: warning - Tag @link: reference not found: X So, assuming this is a CA issue, where CA should not include X in the proposals list. Trying to investigate CA.
So, we can fix the CA behavior but it definitely sounds like EMF should not generate such invalid @link reference...
Not that javadoc tool currently do not produce any no error for the following syntax: {@link <X>}. But it seems to be a side effect of bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6300302. So, we need to verify the new javadoc tool behavior when this bug will be fixed and modify our if necessary...
Modify summary according to the real JDT/Core issue.
Created attachment 67072 [details] [patch]: proposed fix + test cases Fix: filter type parameters when performing CA whithin a Javadoc Added 2 test cases to JavadocBugsCompletionModelTest (testBug185576a and testBug185576b) All JDT Tests completed OK Frédéric: may you please review
(In reply to comment #7) > Created an attachment (id=67072) [details] > [patch]: proposed fix + test cases > > Fix: filter type parameters when performing CA whithin a Javadoc > Added 2 test cases to JavadocBugsCompletionModelTest (testBug185576a and > testBug185576b) > All JDT Tests completed OK > Frédéric: may you please review > First test looks suspicious... I would expect to have at least one proposal: test class itself (first proposal in the second test).
Second test is not correct, class X should not be public as it is a secondary type
(In reply to comment #9) > Second test is not correct, class X should not be public as it is a secondary > type > Forget this comment, I mixed parenthesis... It is correct
(In reply to comment #8) > (In reply to comment #7) > > Created an attachment (id=67072) [details] [details] > > [patch]: proposed fix + test cases > > > > Fix: filter type parameters when performing CA whithin a Javadoc > > Added 2 test cases to JavadocBugsCompletionModelTest (testBug185576a and > > testBug185576b) > > All JDT Tests completed OK > > Frédéric: may you please review > > > First test looks suspicious... I would expect to have at least one proposal: > test class itself (first proposal in the second test). --> same for me, the reason I implemented the second one :-)
Created attachment 67098 [details] [patch]: proposed fix + test cases Following Frédéric review: - fix is OK - test case were modified to conform with expected behavior / result (Compiler Options 1.5, completion start position) (All JDT UI tests also completed OK)
Patch is OK, only 2 minor issues: the 2 tests still have the ONLY_ prefix and there's an unnecessary change in AbstractJavadocCompletionModelTest... I'll fix these issues before releasing the patch.
Patch released for 3.3 RC1 in HEAD stream
(In reply to comment #13) sorry for the extra work - thanks for the review
Verified for 3.3 RC1 using build I20070515-0010.