Tuesday, December 9, 2008

Reverse-engineer Source Code into UML Diagrams

How to use in maven



Install dependency program:

sudo apt-get install graphviz

Maven command:

mvn site

PACKAGE org.exoplatform.services.portletcontainer.pci

2. inferrel and inferdep
3. inferrel, inferdep, operations and constructors

CLASS ActionInput

2. inferrel and inferdep

3. inferrel, inferdep, operations and constructors


2. inferrel and inferdep
3. inferrel, inferdep, operations and constructors


It works pretty good!!!

Documentation here

What Gets Drawn

Same as -attributes -operations -visibility -types -enumerations -enumconstants
Show class attributes (Java fields)
Name the element using the text in the javadoc comment, instead of the name of its class.
Show a class's constructors
When showing enumerations, also show the values they can take.
Show enumarations as separate stereotyped primitive types.
Specify entities to hide from the graph. Matching is done using a non-anchored regular match. For instance, "-hide (Big|\.)Widget" would hide "com.foo.widgets.Widget" and "com.foo.widgets.BigWidget". Can also be used without arguments, in this case it will hide everything (useful in the context of views to selectively unhide some portions of the graph, see the view chapter for further details).
Show class operations (Java methods)
Produce fully-qualified class names.
Add type information to attributes and operations
Specify the fully qualified name of a class that contains a view definition. Only the class diagram specified by this view will be generated.
See the views chapter for more details.
Generate a class diagram for every view found in the source path.
Adorn class elements according to their visibility (private, public, protected, package)

Relationship Inference

Specify the classes that will be treated as containers for one to many relationships when inference is enabled. Matching is done using a non-anchored regular match. Empty by default.
Try to automatically infer dependencies between classes by inspecting methods and fields. See the class diagram inference chapter for more details. Disabled by default.
Enable or disable dependency inference among classes in the same package. This option is disabled by default, because classes in the same package are supposed to be related anyway, and also because there's no working mechanism to actually detect all of these dependencies since imports are not required to use classes in the same package.
Specifies the lowest visibility level of elements used to infer dependencies among classes. Possible values are private, package, protected, public, in this order. The default value is private. Use higher levels to limit the number of inferred dependencies.
Try to automatically infer relationships between classes by inspecting field values. See the class diagram inference chapter for further details. Disabled by default.
The type of relationship inferred when -inferrel is activated. Defaults to "navassoc" (see the class modelling chapter for a list of relationship types).
Will also use imports to infer dependencies. Disabled by default, since it does not work properly if there are multiple classes in the same source file (will add dependencies to every class in the source file).

google codesearch ? pom.xml + UmlGraphDoc
google codesearch ? pom.xml + org.umlgraph.doclet.UmlGraphDoc


Anonymous said...

i am very much interested in your blog...... but i dont understand the message coz itz a russian i think.. but i like it... by http://neodrops.blogspot.com

Alexey Zavizionov said...

Updated with help information.

Sample of usage this plugin