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 20188 - JavaDoc comments should be generated
Summary: JavaDoc comments should be generated
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: Other Other
: P3 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-06 08:35 UTC by Svata Dedic
Modified: 2004-08-13 12:11 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2002-02-06 08:35:49 UTC
I've noticed that XMI format can contain annotations for metamodel elements. I 
suggest that the annotation is copied into the generated interfaces as JavaDoc 
comments.
For classes associations and packages, it's easy. For attributes or 
referencies, the generator would have to be more clever: it could put the 
annotation to a getter and document the setter with a general description 
"This method sets XXX attribute, @see getter".
Since association end correspond to assoc end getter in the association, the 
comment created for it as well. If there's a reference without a comment, the 
comment can be generated from the appropriate association end's annotation.
Comment 1 _ briansmith 2002-02-06 16:37:48 UTC
There is a JMI-defined tag javax.jmi.javaDocs that can be attached
to operations, classes, and packages [JMI 4.6.4]. Unfortunately, the
JMI draft doesn't say anything about how to attach JavaDoc to
attributes or references; that means that the tag cannot be used for
the majority of the metamodel's features. I suppose there probably
needs to be "javax.jmi.javaDocs.setter" and
"javax.jmi.javaDocs.getter" tags for attributes and references.

Even using "annotation" pr te "javax.jmi.javaDocs" tag, I don't think
it is possible to use any markup (HTML tags). Actually, the XMI spec
says that an XMI importer is supposed to ignore any tags inside a
"String" that it doesn't understand, but the DTD/Schema that get
generated don't allow any tags in Strings anyway. Therefore, it might
be worthwhile to consider using an XMI extension element (perhaps JMI
could standardize one if it isn't too late).

By the way, I made a really simple XSLT+Servlet application that lets
you browse the classes of a metamodel like you are using JavaDoc
documentation (for an example see,
http://m43414.medicine.uiowa.edu/md-xmi/servlet/XMIDocServlet?model=MOF&version=1.4)
It is similar to Dave Carlson's but developed independently. I could
easily extend it to recognize the "javax.jmi.javaDocs" tag and/or the
"annotations" attribute along with more model elements (it doesn't do
DataTypes or Associations yet, and some of the links are broken).
Comment 2 Martin Matula 2004-06-20 11:28:06 UTC
Generation of javadocs from metamodel annotations is implemented.