views:

1285

answers:

8

I'm inspired by the C/C++ question for a code flow visualization tool.

Is there such a thing for Java servlets or applications?

+1  A: 

JBuilder's UML view goes some of the way

Galwegian
+1  A: 

If found that Doxygen works for Java also.

dacracot
+1  A: 

IBM has an old (2004) structure analysis tool that does some visualization of Java code.

Netbeans' UML does a decent job reverse engineering the code too.

Joshua
Do you know off hand what UML models NetBeans can reverse engineer? I've only reversed engineered into Class diagrams, but I'm wondering if it can also be used to go from code into sequence diagrams.
Thomas Owens
+1  A: 

Maybe Ctrl+Alt+H in Eclipse / IntelliJ IDEA ? (albo present in NB somewhere) Or "data flow from/to" in IntelliJ IDEA?

karolrvn
A: 

In UML 2 there are two basic categories of diagrams: structure diagrams and behavior diagrams. Every UML diagram belongs to one these two diagram categories. The purpose of structure diagrams is to show the static structure of the system being modeled. They include the class, component, and or object diagrams. Behavioral diagrams, on the other hand, show the dynamic behavior between the objects in the system, including things like their methods, collaborations, and activities. Example behavior diagrams are activity, use case, and sequence diagrams.

Here, my understanding is that the OP is asking for a tool to visualize code flow (this is the title of the question), i.e. dynamic behavior. A perfect diagram for this would be the sequence diagram.

But, AFAIK, neither UML reverse engineering tools nor Doxygen can figure out such diagrams from sources. These tools know how to generate structure diagrams (e.g. class diagram), but not behavior diagrams (this would require execution). So these tools doesn't answer the question (even for C++).

IMO, to visualize the code flow, you'll have to look at the call hierarchy as someone pointed out.

Pascal Thivent
A: 

My favorite one was Creole. Unfortunately last update was made on August 10, 2007... but still it is worth trying.

Another option, but more for the architecture visualization than code flow, is Structure101, which is a great tool and absolutely worth to check out.

Artur Zielazny
A: 

I have tested this and is AWESOME for automatic sequence diagram generation

http://code.google.com/p/jtracert/

Fredy Bello
A: 

HandyEdit has made a plugin that does exactly this: http://plugins.intellij.net/plugin/?id=3739

Ken Gullaksen