[MonoDevelop] Re: [Dev] generate uml diagrams for .net assembly

Rubens Ramos rubensr@users.sourceforge.net
Tue, 23 Nov 2004 09:43:54 +1030


On Tue, 2004-11-23 at 08:47, CJ Collier wrote:
> On Mon, 2004-11-22 at 13:57 -0800, CJ Collier wrote:
> > On Sun, 2004-11-21 at 23:59 -0800, chris@mosaix.net wrote:
> > > Guys,
> > > 
> > > i wrote a quick and dirty tool to generate a uml diagram for an
> > > existing .net assembly. it outputs a dia file (gzip'd xml). It supports
> > > classes, enums, and interfaces so far. WARNING: dia seems to perform
> > > amazingly slow when you have as many objects as what is contained in
> > > System.dll. It does no positioning (yet) of the objects, so everything
> > > is at position (0,0) untill you move it.
> > > 
> > > execute the prog like:
> > > 	mono net2uml.exe --ass="pathtoassembly" --out="assembly.dia"
> > > 
> > > this should speed up the development of UML diagrams greately.
> > > 
> > > ~ chrish01
> > > --
> > > catch me on irc.gnome.org #monodevelop if you got ideas/help
> > 
> > Looks great.  Now we need inheritance graphs and a way to position the
> > elements and such.  Whee!
> > 
> > I'll see if I can't think of a way to implement positioning...
> 
> Anyone know if graphvis can be used to position arbitrary graphics
> (.png, .svg files, etc), or if it only positions items that it generates
> itself?  The only experience I have with graphvis is what Chris showed
> me at lunch today.
> 
> C.J.

I *think* you would have two ways of doing this:

1) Converting diagram descriptions to the Dot language, using
   the command line tools, and then reconverting them back to
   Dia/whatever format you are using in your tool. This may not
   be good as I am not sure you can represent everything from
   UML using Dot constructs and node/edge attributes.
2) Using one of the libraries programmatically, and then building
   the graph - for this you would need wrappers to the language
   you want to use (C# ?). However, you may end up having the
   same problem as in (1).

The documentation for this stuff is in:

http://www.graphviz.org/Documentation.php

Document: "Using Graphviz as a library"