Generating and modifying uml class diagram [message #539749] |
Sat, 12 June 2010 12:01  |
Eclipse User |
|
|
|
I have to create a plugin that generates a class diagram from a java project and then modify programmatically this diagram by adding shapes (like arrows or circles) and/or new classes.Could you please give me some advice on which frameworks or tools I could use and maybe suggest some relevant documentation?
Thanks in advance
|
|
|
Re: Generating and modifying uml class diagram [message #539916 is a reply to message #539749] |
Mon, 14 June 2010 05:35   |
Eclipse User |
|
|
|
Hi,
we usually distinguish two steps in such a process :
- getting a UML model wich contains information about your java programs (package, classes declarations ...). With Eclipse UML framework it will be serialized in a .uml file.
- getting a graphical view of the UML informations (diagram with arrows, boxes...)
-> MoDisco targets the first step.
-> Both UMLTools and Papyrus (Eclipse UML2 modeling tools, see http://www.eclipse.org/modeling/mdt/), can initialize diagrams based on .uml model file. For getting some api for programmatically initialize/modify the diagrams, i propose you to have a look in the UML2Tools or Papyrus forums.
About the first step, MoDisco proposes Components for Java->UML M2M transformation (using KDM intermediate metamodel) adressing Class diagrams. You will find documentation at
Java-> KDM : http://wiki.eclipse.org/MoDisco/Components/Java/Documentatio n/0.8#Java_Discoverer
KDM -> UML : http://wiki.eclipse.org/MoDisco/KDM/Documentation#UMLConvert er
The both two actions can be called programmatically. For examples, you should look at tests projects from our svn :
- org.eclipse.gmt.modisco.java.discoverer.tests (SimpleBlackBoxDiscoverer)
- org.eclipse.gmt.modisco.kdm.uml2converter.tests
For installing MoDisco :
- install "Eclipse Helios Modeling Tools" bundle from http://www.eclipse.org/downloads/index-helios.php
- in your workbench, use the "Install Modling Components" button and select MoDisco
Regards.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03893 seconds