I have a huge java project comprsisng of a number of packages. I want to generate class diagrams ,sequence diagrams for the entire project. Are there any tools/eclipse plugins available that can help, (i don't want to go to each and every file)?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I can imagine that it might be possible to generate class diagram(s) from source code, although they will very likely be completely unreadable if your project is as "huge" as you say.
What I can't imagine is that any software will be able to automatically generate sequence diagrams (a dynamic view of a system in operation) from source code (a static view of the components of a system).
I can only echo Ilja's comment: who needs these diagrams, and what do they hope to do with them?
There are a number of static source code analysis programs that will show you how classes reference or depend upon one another. That might give you a starting point. I usually just scribble a class diagram of some sort with pencil & paper as I read code. Once in a while I run across somethign so complex I make a nice diagram and keep it. In my own code I consider that a design failure and try to fix it instead.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Darya Akbari: you and me and a lot of others belong to the group of people who prefer the visual learning style, because our brain like it this way.
While we need all the help that we can get, one needs to remember that tools are no panacea. Code can lie - mis-named classes and methods, mis-partitioned classes, etc. While I like to prepare diagrams of the system under work, the majority of the benefit comes from the code inspection, not the resulting diagram (in many cases I can toss the diagram once I'm done; model to understand). A reverse engineering tool would have to implement an AI capable beyond the mere writing of code in order to discover/intuit the intent of code. Most of the time you yourself will have to read the code to discover its intent. Reading code is as much part of our job as writing it and reading (other people's) code is a skill that can only be honed through practice (however painful it may be at times).
You may want to try MaintainJ, an Eclipse plug-in to generate runtime sequence and class diagrams for a use case. You can define the start and end points of a use case and generate the sequence diagram for all the object interactions for that use case. Check the demo on the web site. [ March 20, 2007: Message edited by: Choudary Kothapalli ]
Regards,<br />Choudary Kothapalli.
Joined: Jan 29, 2003
That's pretty neat. I'd thought about analyzing calls for this purpose with logs from a performance analyzer we used but never tried it. They've done a nice job of integrating with Eclipse. I wonder if you can tell it to leave out the Java library or other packages - it's easy to get buried in detail and lose the major abstractions.