Monday, August 25, 2008

Reverse-engineer Source Code into UML Diagrams

I wrote an article at Javalobby and testearly about how to use UMLGraph to generate UML diagrams from existing source code, how to integrate these within your build file, and also use the Ant targets within Hudson CI job, and keep your code base and the UML diagrams in sync. I also show how to include these ant targets in your commit builds or nightly builds of your CI jobs, and also publish these artifacts as part of the post build process.

The article shows how easy and simple it is to include UML diagrams within your Javadoc and also keep them updated with every change in the source code repository. We can do these in less than a few minutes, and in a few simple steps.

Getting started with UmlGraph takes five steps:

  1. Download the source code for UMlGraph.
  2. Download and install Graphviz.
  3. Make changes to your Ant build file.
  4. Run the Ant target.
  5. Add this target to your CI job.
The above 5 steps are covered in detail in the article.

Take a look at the article, and share your thoughts. The response has been amazingly good for this article.

4 comments:

  1. Mam, i choosen this UMLGraph as my 5th sem project of MCA, I don't know what all the required softwares to it and clear picture of how to run it.
    Plz help me out.
    Thank U

    Plz mail the details to skbb18@gmail.com

    ReplyDelete
  2. Hi Shashikiran,
    You need the jar from UMLGraph and the dot executable. Nothing else.
    The detailed tutorial can be read at Javalobby for which the link is provided above.

    ReplyDelete
  3. Mam,
    How the quality of the generated sequence diagram image can be improved.
    This command
    pic2plot -Tgif FILENAME.pic >FILENAME.gif produces the image with low quality and words are difficult to read in the generated image.
    can you please help ?

    ReplyDelete
  4. Hi Mam,
    Posted a message earlier as Anonymous. here is my issue with uml graph.
    How can we improve image quality of the generated sequence diagram ?
    I used this command
    pic2plot -Tgif FILENAME.pic >FILENAME.gif
    But the output image is poor quality and unreadable.
    can you please help if you have any clues ?

    ReplyDelete