Automatic tool to generate Sequence and Class Diagrams (UML)
Afficher commentaires plus anciens
Last month, 2020-10-03, I uploaded
which is a complete rewrite. (It generates UML class diagrams from m-code.)
=====================================
Answer 2 on 2012-03-10:
Answer 2 on 2012-03-07: I replaced the diagram. The possibilities to control the layout are limited. How much control is needed?
Answer 2 on 2012-02-29: What characteristics of a UML sketching and documentation tool are required to make it useful in the design and programming process?
Answer 1 on 2012-02-24: I have started to make a tool.
Question on 2012-02-12: Does it exist a tool to automatically generate UML-diagrams from Matlab m-code? If not I plan to make a simple tool.
=====================================
I want an automatic tool to generate UML diagrams from MATLAB code. Thus, I ask for your comments on the following idea. Is is worth to try? Is there already such a tool for MATLAB? There are for other languages.
Currently, I sporadically use the interactive tool UMLet, which is really easy to use. However, I don't update the diagrams when I make changes to my MATLAB-code.
The idea is to put together a tool that consists of three parts
- A home made MATLAB-code that reads MATLAB class definition files and writes code in a simple domain specific language, DSL, for PlantUML
- PlantUML converts the DSL-code to a GraphViz dot-file
- GraphViz produces the diagrams
I have looked at the three open source tools, TextUML, UMLGraph and PlantUML. I have experimented a bit with PlantUML and picked that.
I hope to get something working in a short time. However, there is a tool, PlantUML Dependency, which creates code for PlantUML from Java-code. It's many lines of code!
There are a number of contributions in the File Exchange. I'll study them.
Here is a list of the tools that I've found.
- Sequence Diagram tool uses MATLAB to draw
- BLOC - Automatic UML class diagram creator uses MATLAB to draw Class Diagrams
- Class Inheritance Browser uses the Bioinformatics Toolbox to draw a diagram. I have parameterized the widths of the listboxes so that they will take long names.
- View Class Inheritance Hierarchy uses optionally the Bioinformatics Toolbox to draw a diagram
- m2html uses GraphViz to draw dependency graphs
- UMLgui,by Ben Goddard, 17 Dec 2013 creates Class Diagrams (added 2014-04-17)
Maybe, The Mathworks has a tool that can be contributed to the File Exchange. However, I assume that this UML Class Diagram is not generated automatically.
8 commentaires
Malcolm Lidierth
le 25 Fév 2012
Modifié(e) : Walter Roberson
le 24 Mai 2021
http://www.jgraph.com/jgraph.html might be of interest too.
James
le 16 Avr 2014
Have you made any progress on this?
per isakson
le 17 Avr 2014
Modifié(e) : per isakson
le 18 Avr 2014
Bradley Stiritz
le 2 Juin 2015
Hi Per, thank you for posting your thoughts and plan of action! I agree with you 100%, Matlab definitely needs a UML tool so that users can benefit from proper visualization of O-O designs.
Would you mind please updating us on your progress over the last year? Thank you in advance, and good luck with the project :)
per isakson
le 14 Oct 2016
Michelle Hirsch
le 26 Mar 2021
Very nice, Per Isakson!
Jason
le 15 Mar 2022
Hi Michelle,
After using the Class Diagram Viewer (and the related Dependency Analyzer) in R2022a, I've come to realize that they both lack a way to visualize composition. That is, the use of class instances that utilize other objects as its properties. You can show dependencies in the Dependency Analyzer, but that is information overload because it shows function calls, etc. At least in my experience, I find it much easier to explain a project hierarchy to others in terms of its composition, rather than inheritance aspects.
Thanks,
Jason
I'd totally second this.
The new Class Diagram Viewer is nice but it lacks the (essential) functionality to display not just (static, "is-a") inheritance but also (dynamic, "has-a") composition.
That way dependencies between classes would be much more apparent:
- Which class makes use of which other class?
- Which class holds or references an instance of another class?
I think there is some more development to the Class Diagram Viewer necessary before it becomes really, really useful.
Though I like what I see in R2023b already. :-)
Réponses (2)
per isakson
le 24 Fév 2012
0 votes
per isakson
le 29 Fév 2012
0 votes
Catégories
En savoir plus sur Class Introspection and Metadata dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

