UML generation using Dump

playerglobal.abc UML

Dump has now another cool feature: UML diagram generation. The UML diagram is exported in DOT format. I think this is a really cool feature because the graph is built by analyzing a SWF file and you get it for free. I will probably create a different tool to make full use of the UML generation since you could link multiple files together for a complete coverage. Since Graphviz is not able to underline text I have choosen to use a dollar sign for static methods. You will also get proper parameter names if you compile your SWF file in debug mode.

This is an example UML diagram for the playerglobal.swc. In order to create it I took the playerglobal.abc from the Tamarin sources and the command was java -jar dump.jar -input playerglobal.abc -uml.

Here are two example representations but be careful. The PNG size is 30831×6232 and might crash your browser. Chrome can display the PNG for me but is not able to show the SVG correct. Firefox displays the SVG very well. You can download the PNG and open it in IrfanView or Photoshop to be safe.

5 Comments

  1. Posted Aug 21, 2009 at 10:38 pm | Permalink

    This is really great, works!
    Just for your information, OmniGraffle is a graphing app for Mac and handles .dot files great.

  2. shaman4d
    Posted Sep 4, 2009 at 10:41 pm | Permalink

    Just WOW! One question how I can save as JPEG|PNG from dotty?

  3. Posted Oct 2, 2009 at 5:20 pm | Permalink

    This is working great, especially with OmniGraffle. Only thing is that I’m analyzing a Flex projects and so there’s a bazillion framework classes cluttering up everything.. is there away to include/exclude certain namespaces from the output ?

  4. Boyajian
    Posted Oct 13, 2009 at 10:10 pm | Permalink

    This is totally cool, nice work Joa! Is there a way to specify where the output .dot file ends up and the name of the file, or are these not options that are available currently with dump?

  5. Posted Oct 15, 2009 at 6:15 pm | Permalink

    Those options are not implemented yet.

3 Trackbacks

  1. By Twitted by philipheyde on Aug 20, 2009 at 10:35 pm

    [...] This post was Twitted by philipheyde [...]

  2. [...] UML generation using Dump at blog.joa-ebert.com – Blog of Joa Ebert blog.joa-ebert.com/2009/08/20/uml-generation-using-dump – view page – cached Actionscript3, Flash, Java, C#, C++, Algorithms & Imageprocessing — From the page [...]

  3. By » Day Two Marc Hibbins on Sep 25, 2009 at 12:08 am

    [...] bytecode for the purposes of debugging and can also be used to generate inheritance graphs and UML diagrams from compiled SWF [...]

Post a Comment

Your email is never shared. Required fields are marked *

*
*