views:

162

answers:

2

i am starting to learn Java using Netbeans 6.8 IDE.

i am wondering if there is a utility in NetBeans similar to VS2008 that facilitates commenting code and later display these comments in class diagrams?

thanks.

EDIT: i found the Javadoc feature. it is some help but not that great.

A: 

NetBeans used to have a UML module, however it's been discontinued since version 6.7. What you can do as a workaround is install an older version of NetBeans alonside your current version, and use the older version to generate the UML diagrams from your code.

Other tools you might look at are Doxygen, which will auto-generate documentation like Javadoc. Paired with graphviz, it can generate visual call graphs, which Javadoc does not do.

JRL
A: 

The NetBeans UML Plugin is not supported in NetBeans 6.8 (according to this thread, it may come back in 6.9). The recommended alternative is to use SDE for NetBeans from Visual Paradigm (they do offer a free, community edition of their UML tool that works with NetBeans).

Some alternatives (based on Javadoc style annotations that will generate diagrams in javadoc):

  • APIviz - APIviz is a JavaDoc doclet which extends the Java standard doclet. It generates comprehensive UML-like class and package diagrams for quick understanding of the overall API structure. (Check the samples!)
  • UMLGraph - (...) In addition, the UMLGraphDoc doclet included in this distribution automatically adds UML diagrams to javadoc documentation. (Example in this article).
  • yDoc (commercial) - Example in the statsvn project.
  • Doxygen - an alternative to javadoc

Personally, I would consider APIviz (that you can call from build tools like Ant or Maven). Really, check this sample to get an idea of the result.

Pascal Thivent