wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Generating Sequence Diagrams for all methods? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Generating Sequence Diagrams for all methods?" Watch "Generating Sequence Diagrams for all methods?" New topic
Author

Generating Sequence Diagrams for all methods?

Amit Paleja
Greenhorn

Joined: Apr 21, 2007
Posts: 7

I am using EclipseUML 2.2 on Galileo to generate sequence diagrams for a piece of Java code. Is there a way by which we can generate sequence diagrams for all the methods in a class at one go?

Thanks


The dictionary is the only place where success comes before work. -Vince Lombardi.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
A Class diagram is used to show some or all of the methods of a Class or a group of Classes.

A Sequence diagram is used to show the communication, i.e. method calls, between a group of Objects for a specific execution path.

It is unclear as to why you would want to show all of the methods for a single Class in a Sequence diagram. This is what a Class diagram does.
Amit Paleja
Greenhorn

Joined: Apr 21, 2007
Posts: 7

I am sorry Jimmy, what i meant was - does the plugin support generating separate sequence diagrams for all methods of a class at one go?

My class has lots of methods and it would be very nice if we could generate sequence diagrams for all the methods rather than a method at a time.

Any idea if this or any other plugin supports such a functionality?
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
No problem.

A Sequence diagram is used to show the communication, i.e. method calls, between a group of Objects for a specific execution path.

I put the important part in bold text above. Sequence diagrams show how multiple objects communicate, not a single object.

There could be hundreds and maybe thousands of possible execution paths involving many objects. There is no way to create a program that can create Sequence diagrams. Sequence diagrams are created manually and by a human. The human is deciding what goes on the Sequence diagram.

You keep mentioning that you want to show all the methods of a Class. Why don't you create a Class diagram then that shows this?
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

Jimmy Clark wrote: There is no way to create a program that can create Sequence diagrams. Sequence diagrams are created manually and by a human.


I use a very old copy of Together 6 and it has a feature that reverse engineers Sequence Diagrams from Java source code. One just has to specify an entry point and let Together do the rest. UML diagrams are meant to condense a design/implementation BUT the Sequence diagrams reverse engineered by Together include every nut,bolt and wart. This makes them pretty much unusable. There are ways to limit the detail but they are not that effective. I can see that almost any tool to reverse engineer Java classes and create Sequence Diagrams must perform in a similar way to Together and is likely to to do exactly what Together does and produce too much detail.


Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
This makes them pretty much unusable.


I'm not sure that I would want to create a product that produces stuff that is unusable. Maybe that is why I have never heard of a product called "Together." lol
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

Jimmy Clark wrote:
This makes them pretty much unusable.


I'm not sure that I would want to create a product that produces stuff that is unusable. Maybe that is why I have never heard of a product called "Together." lol


Together was created by some Russians and bought by Borland a few years ago and is now marketed by them. Version 6 (the Russian version) is a great product for both system analysis, Java design and Java development and it does a pretty good job of reverse engineering Java classes to create class diagrams. It does not do a great job of reverse engineering sequence diagrams.

I still use Together 6 for Design and Analysis though I don't use it these days for programming since it does not deal with Java features introduced in Java 5. Obviously the newer versions of Together will handle Java 5+ but the product is very expensive and I can't justify the cost of buying an upgrade.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Does it create Use Case diagrams from Java code?
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

Jimmy Clark wrote:Does it create Use Case diagrams from Java code?


Together version 6 does not. I find the concept of reverse engineering Java code to create Use Cases difficult to comprehend.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Generating Sequence Diagrams for all methods?
 
Similar Threads
Reverse Engineering In Rational Software Architect
Passed SCEA Parts 2 and 3 !!!!!!!!
Class Diagram
Class Diagram Detail
Pass Part 2 and 3 with100% - my experience