mirror of https://github.com/dspinellis/UMLGraph
View support documentation
This commit is contained in:
parent
f85f88c082
commit
7fe982d20e
|
|
@ -65,11 +65,21 @@ Matching is done against the end of each entity's name.
|
|||
For instance, "<code>-hide Widget</code>" would hide "<code>com.foo.widgets.Widget</code>" and
|
||||
"<code>com.foo.widgets.BigWidget</code>".
|
||||
</dd>
|
||||
<dt>-hideall</dt><dd>Hide all entities from the graph. Used with views to show only a specific
|
||||
subset of classes in each class diagram.
|
||||
</dd>
|
||||
<dt>-d</dt><dd>Destination folder for .dot files generated from views.
|
||||
</dd>
|
||||
<dt>-view</dt><dd>Specify the fully qualified name of a class that contains a view definition. Only
|
||||
the class diagram specified by this view will be generated.
|
||||
</dd>
|
||||
<dt>-views</dt><dd>Look into the source path and generate a class diagram for every view that is found.
|
||||
</dd>
|
||||
<dt>-apidocroot</dt><dd>Specify the URL that should be used as the "root" for local classes.
|
||||
This URL will be used as a prefix, to which the page name for the local class or
|
||||
package will be appended (following the JavaDoc convention).
|
||||
For example, if the value <code>http://www.acme.org/apidocs</code> is
|
||||
provided, the class <code>org.acme.util.MyClass<code> will be mapped to the URL
|
||||
provided, the class <code>org.acme.util.MyClass</code> will be mapped to the URL
|
||||
<code>http://www.acme.org/apidocs/org/acme/util/MyClass.html</code>.
|
||||
This URL will then be added to .dot diagram and can be surfaced in the
|
||||
final class diagram by setting the output to SVG, or by creating an HTML page
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" ?>
|
||||
<!-- $Id$ -->
|
||||
<notes>
|
||||
Documenting a big project usually requires multiple diagrams, each design to show a specific and limited portion of the system.
|
||||
Each diagram is usually composed of few classes, possibily using a different detail level.<p/>
|
||||
Following the approach of the UMLOptions class, we introduced the <code>@view</code> tag, that marks a special class used to describe a single class diagram.
|
||||
Similarly to UMLOptions, the view can define his own general options, but what makes it interesting is the ability to specify package based <em>overrides</em> that allow to adopt different options based on the package the classes are in.
|
||||
The general syntax of an override is:
|
||||
<pre>@opt_override REGEXP ([!]option)*</pre>
|
||||
where REGEXP is a java regular expression that will match a single class, a group of classes, a package, and option is one of the UMLGraph options that
|
||||
are usually specified with the <code>@option</code> tag. A ! before the option disables the option for the specified package.
|
||||
For example:
|
||||
<pre>@opt_override net.test.* !operations types</pre>
|
||||
will add type information and disable operations listing for every class in the net.test package (and its subpackages).<p/>
|
||||
Multiple overrides can be specified in the same view, and they will be evaluated in the specification order (so, the last one wins in case of conflict).
|
||||
For example:
|
||||
<pre>
|
||||
/**
|
||||
* @view
|
||||
* @hidden
|
||||
* @opt_override .* hideall
|
||||
* @opt_override net.test1.* !hideall
|
||||
* @opt_override net.test2.* !hideall attributes operations visibility
|
||||
*/
|
||||
class NetTest2PackageDiagram {}
|
||||
</pre>
|
||||
defines a class diagram for the net.test2 package. Everything in this package is shown, classes in the net.test1 package are shown as well,
|
||||
but without details (probably because they are somewhat related to the net.test2 classes), the rest is hidden.<p/>
|
||||
Each view will generate a .dot file whose name is the name of the view (only the class name). Use the <code>-d</code> command line
|
||||
parameter to better specify in which folder the .dot files should be generated.
|
||||
Oh, if you're wondering why we used ".*" as the regular expression to hide all the classes (and not simply *), that's because
|
||||
this is not a file system like wildcard, but a java regular expression: see the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html">Pattern</a> javadoc for further details.
|
||||
</notes>
|
||||
|
|
@ -14,7 +14,8 @@
|
|||
<ch><ti>Class Diagram Example: Real Example (Catalina Classes)</ti><fi>ceg-cat</fi></ch>
|
||||
<ch><ti>Class Diagram Example: Class Stereotypes and Tagged Values</ti><fi>ceg-ster</fi></ch>
|
||||
<ch><ti>Class Diagram Example: Colors, Global and Local Options</ti><fi>ceg-color</fi></ch>
|
||||
<ch><ti>Class Diagram Example: Multiple Views</ti><fi>ceg-mv</fi></ch>
|
||||
<ch><ti>Class Diagram Example: Multiple Views (command line)</ti><fi>ceg-mv</fi></ch>
|
||||
<ch><ti>Class Diagram Example: Multiple Views (internal support)</ti><fi>ceg-mvi</fi></ch>
|
||||
<ch><ti>Sequence Diagrams</ti><fi>seq-intro</fi></ch>
|
||||
<ch><ti>Syntax of Sequence Diagram Definitions</ti><fi>seq-syntax</fi></ch>
|
||||
<ch><ti>Defining a Simple Sequence Diagram</ti><fi>seq-simple</fi></ch>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
the extends keyword (Arnaud Rogues).</li>
|
||||
<li> Javadoc documentation (Andrea Aime).</li>
|
||||
<li> Centralized option handling in the Option class (even for command line arguments) (Andrea Aime).</li>
|
||||
<li> Addded "views", that is, the ability to specify package based option overrides in UMLOptions like classes,
|
||||
and to generate multiple diagrams out of a code base in a single pass. See the new tags @view, @opt_override,
|
||||
@hideall, and the command line parameters -d, -view, -views (Andrea Aime)</li>
|
||||
</ul>
|
||||
|
||||
<dt>Version 4.1 2005/11/15</dt><dd>
|
||||
|
|
|
|||
Loading…
Reference in New Issue