Generate full class diagram using GraphViz and Doxygen - doxygen

I'm currently working on my internship, and for the company's sake I decided to just go ahead on the programming work. For my current internship that seemed to fit better than to create all kinds of diagrams no one gets or uses.
Now I ran into a problem though. 4 weeks of internship and 50 java-classes later my school decided they want to see a class diagram. I've already got doxygen set up with GraphViz to generate partial class diagrams, with the focus on only one of the classes and it's associations. But what I wonder is, is it possible to generate one class diagram containing all relations from all classes? Or am I gonna have to try to convince my school that this way the class diagrams have better readability?

The short answer is that this is not possible. Doxygen parses the code and includes only classes in the diagrams which are in any direct or indirect relationship with the documented class.
A general class diagram containing all classes and their associations is not generated by doxygen.
Play araound with the diagram options of doxygen to see with graphs make sense for you (either using the "doxywizard" [Wizard tab -> Diagrams or Expert tab -> Dot] or as I prefer editing directly the doxyfile).
I don't believe that a class diagram with more than 50 classes makes sense, because this would result in a hard to read diagram which is more confusing than helping. (Generally it might be better to organize your code in packages which you might document using the grouping feature of doxygen. In that case you could use the collaboration diagrams to show more high level relations between the packages.)
Another approach might be using a UML/CASE tool to generate UML diagrams from your code (e.g. Enterprise Architect from Sparx Systems, you could import your code and let the tool generate class diagrams out of it). You could include such generated graphs by exporting that graphs as picures and including that pictures in your doxygen generated documentation using the \image tag.
I hope this helps.

Related

Model-to-Model-Transformation - no meta model for source

I have to do a model-to-model transformation but the source model is rather obscure but also quite similar to UML activity diagrams (which are also the target by the way).
I've looked into tutorials for Eclipse Modeling Tools but I struggle a lot with it. Also, because there is no meta model for the source, I'm not sure if EMT is any help. What are my options here? Can I use EMT, should I use another tool in this case or should I write a generator myself?
Greetings

How can i generate domain model diagrams, and documentation

I imported my project files into Enterprise Architect, under the Domain Model section. The program imported the files correctly, but it did not create domain model diagrams, so i can generate documentation about it, but it is empty.
If i imported the project files under the Class model section, class diagrams creates, and i able to generate documentation correctly. But i need the Domain Model.
So, how can i generate domain model diagrams, and a correct documentation with them?
There's no point in having EA generate diagrams for you (although that is possible as well). The only thing that will do is create huge, unreadable "wallpaper" diagrams.
You better create the diagrams yourself.
Just add a diagram in a package and start dropping classes onto it.
Once you have usable diagrams you can generate your documentation.

Switching from Rhapsody to Eclipse (Papyrus) - UML model conversion?

Our team has been using Rhapsody for developing UML models and c++ code for 10+ years, and we would like to switch to Eclipse and use Papyrus for UML modeling.
We have compatibility concerns: would the UML models (all class diagrams, state machines etc) created in Rhapsody be all portable to Papyrus/Eclipse easily? Rhapsody can export UML models into XMI files (UML 2.1, 2.2, 2.3 standards). My questions is: is Papyrus able to reconstruct diagrams from XMI files
If not, are there better alternative UML plugins that work in Eclipse?
The XMI file exported by Rhapsody contains only meta data of the models. Is there a quick way to port the entire project from Rhapsody into Eclipse? Anybody experienced the similar?
Your answers will be much appreciated.
First, I must mention that I am directly involved with Papyrus, especially with the brand new Papyrus for Real Time project, at Eclipse.
First to set expectations... Moving diagrams between modeling tools has always been an exercise in frustration... There have been "standards" over the years (e.g., OMG's XMI-DI), but none seem to have been fully successful and all have necessitated a manual review. Note that I have not tried with the latest version of UML (2.5).
Now the model semantics, however, have a tendency to be more portable, especially with more recent versions of UML. I am not sure which version Rhapsody pretends to support, so it would be difficult to comment further.
With the version of Papyrus that is currently in development (with a scheduled June 2015 release), the notion of "canonical" diagram has been added. This provides for automatic creation and update of some diagrams under certain condition. for example, many behaviour diagrams, such sequence diagrams and some structure diagram, such as composite structure, can be canonical and generated from the semantic model. However, layout would still need to be adjusted. Other diagrams, such as class diagrams, would have to be manually re-created.
As was mentioned in the comment to your question, trying it out would give you the best indication of how much work is involved.
I am interested in this topic and I did a simple research on it: in fact a connector between RSA and Ppayrus is already open source https://www.eclipse.org/forums/index.php/t/835114/ it could be usefull to take a look at it and implement the same for Rhapsody.
I know that the Rhapsody XMI export did not export the graphical elements, you should probably then export them in a serialized format and mapping htem to papyrus diagram element.
other interested work but seems not to be free : modelbus https://www.modelbus.org/en/rhapsody.html which implement connectors with Papyrus EA and Rhapsody : could be also interesting to look at.
I am interested in your feedback if you did not let it down and do achive the mapping :)

Hyperlink from a class to another diagram in IBM Rational Software Architect 9.0?

In RSA 9.0, is there a way to put a diagram hyperlink on a class such that when I double click that class, the defining diagram for that class opens? A competing tool called MagicDraw supports this functionality. Is there a similar feature in RSA? I've looked long and hard in the RSA help and in online forums and come up empty handed.
Note: I do NOT want to put a diagram beneath a class, such that the class owns it, because one diagram can define several classes.
There is an option "Navigate to Diagram" that shows up in the context menu of several elements that is supposed to do precisely this. This can even be done from different views (Project explorer, search view etc)

UML tool for reverse engineering an eclipse project

I am currently working on a project in Eclipse but the problem is that this project is very big (a lot of codes, classes, packages, etc) and undocumented. Since, the project is written in Java, my idea was to make a reverse enineering of the project to see his architecture in UML. Do you know an eclipse plugin who can complete this task very easily? Thanks for your answer !!
I think MoDisco is what you are looking for ( here for a short intro)
It seems that the question is dealing with Eclipse plugin therefore Modisco and StartUML are not a possible choice because they are either not a graphical class diagram viewwer or an Eclipse plugin.
The tools that I have evaluated and selected are:
Topcased can reverse a project and gives an UML view. The reverse is good even if not recursive. I mean that you can detect only object having their own information such as class, interface, package, method and attributes but you can not detect calls between classes because this require a recursive reverse.
eUML will give you a visual class diagrams and the possibility to navigate but no model only EMF tags inserted inside your own code. I like the visual representation of the class diagram but having EMF tags in my code is too intrusive !!
You can try RSA which is a pretty good reverse having a real UML model but you will also get EMF tag in your code
The best for me and with no doubt is EclipseUML Omondo with no tag in the code and a high quality UML model but it is really too expensive !!
I'd advise StarUML or StavrUML, the unofficial fork. It reverse engineers code compliant with Java versions before 1.6 or something. Yes, the project was abandoned years ago, but the UML editor remains incredibly strong and powerful.
However, I'd avoid using reverse engineering a UML diagram. You'll probably get an unreadable mess out if it. Just get stuck in and make it manually :)
I'm sure you can find a suitable tool for your needs if you check these.