File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reverse enginnering java project

 
shobhit garg
Ranch Hand
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

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)?


Regards,
Shobhit
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What will you do with those diagrams?
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
shobhit garg
Ranch Hand
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well its not that huge also in the first place ...
i just needed them to get a picture of how the classes
are interacting with each other ..nothing more
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shobhit,

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. So don't get nervous, there is nothing wrong with you .

Look at EclipseUML from Omondo which is a free Eclipse plugin. Unzip the given ZIP file into your Eclipse directory. You can reengineer other's projects and get the visual overview you want .

Regards,
Darya
 
Peer Reynders
Bartender
Posts: 2933
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).

Reading code is such an important skill that Object Oriented Reengineering Patterns (amazon US) has a section called: PART I Reverse Engineering: 3.2 Read All the Code in One Hour.
 
Justin Chu
Ranch Hand
Posts: 209
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ArgoUML is an open source UML tool.

Poseidon Community edition has a trial period. I feel that it is easier to use than ArgoUML.

Visio is useful for quick manual construction of UML diagrams.

Let me know if there are more good tools out there.
 
Bruce Jin
Ranch Hand
Posts: 672
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes EclipseUML from Omondo (free edition) will do the trick. I used it to get the class diagrams.
 
Choudary Kothapalli
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shobhit,

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 ]
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic