Bug 68087

Summary: [Javadoc] '-' character should be accepted in tag names
Product: [Eclipse Project] JDT Reporter: seto
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: farrell.farthing.extern
Version: 3.0   
Target Milestone: 3.0.1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description seto CLA 2004-06-21 16:03:30 EDT
I have a doclet comment of the following:

/**
 * @abc.def-ghi name="xyz"
 */

Using the AST apis to parse this comment and add it to the BodyDeclaration I 
notice that its org.eclipse.jdt.core.dom.Javadoc instance contains the 
org.eclipse.jdt.core.dom.TagElement with name as abc.def and not as abc.def-ghi 
as I would have hoped.
Comment 1 Frederic Fusier CLA 2004-06-22 04:49:16 EDT
'-' is not a valid tag name character as Javadoc tool reject this kind of tag:
warning - @abc.def-ghi is an unknown tag.
even if you add tag option:
-tag "abc.def-ghi"
Comment 2 Daniel Berg CLA 2004-06-22 10:54:10 EDT
How can this be true????
XDoclet has the following ejb class level tags and there are many of them with 
a '-' character in them.

@ejb Class Level Tags

@ejb.bean

@ejb.dao

@ejb.data-object

@ejb.ejb-external-ref

@ejb.ejb-ref

@ejb.env-entry

@ejb.facade

@ejb.finder

@ejb.home

@ejb.interface

@ejb.persistence

@ejb.pk

@ejb.remote-facade

@ejb.resource-env-ref

@ejb.resource-ref

@ejb.security-identity

@ejb.security-role-ref

@ejb.util

@ejb.value-object

I think this defect needs more investigation because the '-' is a very common 
annotation separator.
Comment 3 Frederic Fusier CLA 2004-06-22 11:48:14 EDT
Current behavior try to match behavior of javadoc.exe tool with *standard*
doclet. So, XDoclet is surely a specific doclet which can make javadoc to accept
dashes in tag names, but the initial intention of Javadoc support in compiler
was only to match standard usage of Javadoc tool...

So, keep this bug open for a further investigation but raise down severity to
enhancement...
Comment 4 Frederic Fusier CLA 2004-06-22 12:25:51 EDT
Deferred post 3.0
Comment 5 Frederic Fusier CLA 2004-06-22 12:26:21 EDT
Reopen to assign...
Comment 6 Frederic Fusier CLA 2004-06-22 12:26:51 EDT
Deferred post 3.0
Comment 7 Frederic Fusier CLA 2004-07-05 09:03:13 EDT
Candidate for 3.0.1
Comment 8 Frederic Fusier CLA 2004-07-05 10:20:43 EDT
We'll set '-' character to be valid in tag names as it seems to be really often
used in specific doclets...
Comment 9 Frederic Fusier CLA 2004-07-08 09:41:50 EDT
Fixed.

For 3.0.1, we only fix the problem for dash character and make it available in
tag names. We'll see if we have time for 3.1 to specify doclet tag names...

[jdt-core-internal]
Change done in AbstractCommentParser.parseComment(int,int).
Test cases added in JavadocTestMixed and ASTConverterJavadocTest.
Comment 10 Frederic Fusier CLA 2004-07-08 09:42:00 EDT
Released in HEAD.
Comment 11 David Audel CLA 2004-09-06 10:26:54 EDT
Verified for 3.0.1 RC1
Comment 12 Frederic Fusier CLA 2004-10-19 05:28:39 EDT
*** Bug 76546 has been marked as a duplicate of this bug. ***