The feature I use for documentation is to:
- directly type my description into the UML metamodel as a text. This could seem strange but why not ? I have all my documentation, my UML model at the same place inside the same file that team mates can access and modified on CVS
- graphical diagrams to reverse the class and sequence diagrams from existing code
I can only do it with EclipseUML Omondo because the other tools are not java oriented.
Omondo first map your full java project to UML 2.2. The reverse is just amazing because you reverse the full project at multiple packages level. Whaoo !!
I mean relation between packages, java annotations, associations etc..I have checked with Enterprise Architect, Rational and Omondo reverse is a lot better. For example you can have interface in one package inherited from classes in another package. The reverse can detect it and add this information in the model. Really cool and useful because I always separate my interfaces and classes and will certainly not model them into the same package :-)
Once the model has been created you can code and update your project and EclipseUML will be updated automatically.
The database mapping is covered by java annotations (e.g. @Entity) which are generated in the code from the diagram or which are synchronized from code to the diagram. No more problem for modeling my database into my class diagram and adding all comments I need.
I don't think that adding my documentation directly in the model as text at the root of the model element is a hack. This is cool and everybody in the team can see each other comments. This make life easier and is an additional more business oriented documentation to the javadoc which is more code oriented. The UML specification never said it is not allowed to add txt documentation directly in the model so why not to use it ? It could graphical or just txt but I prefer txt because graphical UML notation is sometimes too hard to understand. I therefore reverse the class diagram, add few notes (e.g; yellow colors) and everything else as txt comment in the model. No risk to make mistake and full documentation immediately available in the workspace of each developer. Each developer can also update the documentation if during the implementation stage something is changed. It means that the documentation is always accurate and everybody is involve and not just the modeler.