Community
Participate
Working Groups
I20071010-1200 /** * This is {@literal raw text: * {@link Try} is just text} * } */ public class Try { } Javadoc.exe compiles this without any warning. It also does not interpret the '{@link}' tag inside the '{@literal}'. http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#{@literal} says: "Displays text without interpreting the text as HTML markup or nested javadoc tags." Eclipse should do the same as Javadoc.exe. Currently it errors 'Javadoc: Missing closing brace for inline tag' as soon as a '{' or a line delimiter appears inside an '{@literal}' tag.
Looks similar to bug 206319 => I also think this inconsistency should be fixed for 3.4 Markus, have you verified the "text" portion in all other Javadoc tags than @see (bug 206319) and @literal (this bug)? If not, Eric please verify and open other bugs if necessary, thanks
> [..] Currently it errors 'Javadoc: > Missing closing brace for inline tag' as soon as a '{' or a line delimiter > appears inside an '{@literal}' tag. Sorry, line delimiters are not a problem here, just '{' inside inline tags. This bug also applies to text inside {@code}.
(In reply to comment #1) > (...) If not, Eric please verify and open other bugs if necessary, thanks verified that only @literal and @code tags were presenting this issue.
Created attachment 98747 [details] [proposed patch + test case] on top v_858 - all jdt.core tests OK
(In reply to comment #4) > Created an attachment (id=98747) [details] > [proposed patch + test case] on top v_858 - all jdt.core tests OK > With this patch, the structure of the Javadoc in the ASTView for the original test case is now: TagElement + FRAGMENTS (5) + TextElement + TagElement + TagElement + TextElement + TextElement This is not correct. As said in bug 206319, we only should have: TagElement + FRAGMENTS (3) + TextElement + TagElement + FRAGMENTS (1) + TextElement + TextElement Note that the last text element is due to the extra closing brace at the end of the javadoc, which, I guess, is a typo in the test case... So, do not report the problem this is not enough, the javadoc parser needs to ignore inline tags inside @literal tags (and @code tags for bug 206319) and not be screwed up by any pair of braces...
Tentatively targeting RC1
Actually we won't have time for 3.4. Deferring
Created attachment 100634 [details] [proposed patch + test cases] on top v865 - all jdt.core tests OK improved fix + added corresponding ASTConverterJavadocTest test cases
frederic, jerome: please review - thanks
This is not a regression comparing to 3.3.2. Will fix for 3.5
Not sure I'll have enough time to validate and finalize the proposed patch...
*** Bug 260478 has been marked as a duplicate of this bug. ***
Update summary to make it clear that this bug fix should also work for {@code} tag...
Satyam, please investigate -- Thanks.
Still appears to be happening in Version: 3.7.0 Build id: I20110613-1736
*** Bug 258706 has been marked as a duplicate of this bug. ***
This is still happening in Mars.2: Version: Mars.2 (4.5.2) Build id: Z20160416-2208 This is causing a lot of frustration, because it's preventing multi-line @code comments in an otherwise warnings-free environment.
Created attachment 263122 [details] Synced up patch The previous patch being very old couldn't be applied on HEAD. I have re created it on HEAD. I am yet to review or run all tests, but quickly checked it solves the problem mentioned in comment #0 and satisfies Fred's earlier comment. Meant to push this to Gerrit, but looks lik Eric doesn't have CLA signed and it's been a long time since he was involved with Eclipse. Need to check with him.
New Gerrit change created: https://git.eclipse.org/r/77462
Looks like some of the recent changes are not working well with the patch. The problem position is not correct for the new tests. Needs more time for this.
(In reply to Jay Arthanareeswaran from comment #18) > Meant to push this to Gerrit, but looks lik Eric doesn't have CLA signed and > it's been a long time since he was involved with Eclipse. Need to check with > him. Since you've re-created the changes, you can also set yourself as the Author and mention Eric in an "Also-By: " line in the commit message.
Just came back to this patch but one of the new tests is failing. Will take a look at it.
New Gerrit change created: https://git.eclipse.org/r/86364
The failures were due to problems in test case itself. Pushed after fixing them here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=0b0f856ffea622a77c7ebc01bae802a409925214
Verified for 4.7 M4 using I20161205-2000 build