diff --git a/doc/cd-model.xml b/doc/cd-model.xml
index e02b08d..964dd7a 100644
--- a/doc/cd-model.xml
+++ b/doc/cd-model.xml
@@ -5,6 +5,10 @@ The UMLGraph class diagrams allows you to model
- classes (specified as Java classes)
+active classes, components, nodes, use cases,
+collaborations, and packages
+(specified as Java classes with an @opt shape tag)
+
- attributes (specified as Java class fields)
- operations (specified as Java class methods)
diff --git a/doc/cd-note.xml b/doc/cd-note.xml
new file mode 100644
index 0000000..b784126
--- /dev/null
+++ b/doc/cd-note.xml
@@ -0,0 +1,47 @@
+
+
+
+In UMLGraph you can easily add a note (comment) to an element,
+using the
@note tag.
+The corresponding text will be split into lines, as specified in the note.
+Multiple tags can be used to add more notes to the same element.
+More complicated, (one to many) relationships can be established
+by creating an element with a note shape, setting its contents
+to its comment text through the @opt commentname tag,
+and associating it with other elements with the @assoc
+tag.
+
+|
+
+/**
+ * @opt shape node
+ * @note Located in the
+ * machine room
+ * @note Sun Blade 6048
+ * @depend - - - MapLocation
+ * @depend - - - DataMine
+ */
+class Server{}
+
+/** @opt shape component */
+class MapLocation {}
+
+/** @opt shape component */
+class DataMine {}
+
+/**
+ * CPU-munching
+ * components that must
+ * run on this server
+ * @opt shape note
+ * @opt commentname
+ * @assoc - - - MapLocation
+ * @assoc - - - DataMine
+ */
+class munchComment {}
+
+ |
+
+ |
+
+
diff --git a/doc/cd-opt-spec.xml b/doc/cd-opt-spec.xml
new file mode 100644
index 0000000..32cea35
--- /dev/null
+++ b/doc/cd-opt-spec.xml
@@ -0,0 +1,46 @@
+
+
+
+Since the options are really a part of the generated graph you
+want in many cases to include them in the diagram specification.
+You can do that by adding javadoc @opt tags in front
+of a class named UMLOptions, as in the following example:
+
+/**
+ * @opt horizontal
+ * @opt all
+ * @hidden
+ */
+class UMLOptions {}
+
+
+Similarly, you can also globally specify options for all the note elements.
+through a class named UMLNoteOptions, as in the following example:
+
+/**
+ * @hidden
+ * @opt nodefontcolor "blue"
+ */
+class UMLNoteOptions{}
+
+
+
+You can also change the UMLGraph operation on a per-class basis by
+using @opt attributes on individual classes.
+In this case the @opt specification temporarily overrides
+the particular global setting for the class being processed.
+
+
Finally, you can reset an option to its default value by prefixing it
+ with an exclamation mark. For example:
+
+/**
+ * @opt !attributes
+ * @opt !nodefontsize
+ */
+class MyClass {}
+
+
+will disable attribute listing for MyClass, and reset the node font size
+to its default value (10).
+
+
diff --git a/doc/cd-opt.xml b/doc/cd-opt.xml
index 1603995..ad92c4c 100644
--- a/doc/cd-opt.xml
+++ b/doc/cd-opt.xml
@@ -1,8 +1,12 @@
-A number of command-line options contol the operation of UMLGraph
-class diagram generator:
+A number of options contol the operation of UMLGraph
+class diagram generator.
+These can be specified on the command line, and most can also
+be specified within the diagram, affecting all or some elements.
+
+The following options are supported:
- -output
- Specify the output file (default
graph.dot).
If the output directory is provided, -output can only specify a file name,
@@ -48,6 +52,9 @@ types.
-enumerations
-enumconstants
+- -commentname
- Name the element using the text in the javadoc
+comment, instead of the name of its class.
+
- -nodefillcolor
- Specify the color to use to fill the shapes.
- -nodefontname
- Specify the font name to use inside nodes.
@@ -90,6 +97,19 @@ names (used only when it package name is postfixed, see -postfixpackage).
package name in the line after the class name, in order to reduce the
width of class nodes.
+- -shape
- Specify the shape to use for the rendered element(s).
+The following UML shapes are available:
+
+- class (default)
+- node
+- component
+- package
+- collaboration
+- usecase
+- activeclass
+
+
+
- -hide
- 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
@@ -184,35 +204,4 @@ you can find a complete list in the
Font names are passed directly to the dot graph generation back-end.
In general the Postcript standard names Times, Helvetica, Courier, and
Symbol are safe to use.
-
-Since the options are really a part of the generated graph you
-want in many cases to include them in the diagram specification.
-You can do that by adding javadoc @opt tags in front
-of a class named UMLOptions, as in the following example:
-
-/**
- * @opt horizontal
- * @opt all
- * @hidden
- */
-class UMLOptions {}
-
-
-You can also change the UMLGraph operation on a per-class basis by
-using @opt attributes on individual classes.
-In this case the @opt specification temporarily overrides
-the particular global setting for the class being processed.
-
-Finally, you can reset an option to its default value by prefixing it
- with an exclamation mark. For example:
-
-/**
- * @opt !attributes
- * @opt !nodefontsize
- */
-class MyClass {}
-
-
-will disable attribute listing for MyClass, and reset the node font size
-to its default value (10).
diff --git a/doc/ceg-shape.xml b/doc/ceg-shape.xml
new file mode 100644
index 0000000..d9c06e6
--- /dev/null
+++ b/doc/ceg-shape.xml
@@ -0,0 +1,75 @@
+
+
+
+
+/**
+ * @hidden
+ * @opt nodefontcolor "blue"
+ */
+class UMLNoteOptions{}
+
+/**
+ * Structural Things
+ * @opt commentname
+ * @note Notes can
+ * be extended to
+ * span multiple lines
+ */
+class Structural{}
+
+/**
+ * spelling.java
+ * @opt shape component
+ * @opt commentname
+ * @note Component
+ */
+class Component extends Structural{}
+
+/** @opt shape node */
+class Node extends Structural{}
+
+/**
+ * Chain of
+ * responsibility
+ * @opt shape collaboration
+ * @opt commentname
+ * @note Collaboration
+ */
+class Collaboration extends Structural{}
+
+/**
+ * Place order
+ * @opt shape usecase
+ * @opt commentname
+ * @note Use Case
+ */
+class UseCase extends Structural{}
+
+/**
+ * Business rules
+ * @opt shape package
+ * @opt commentname
+ * @note Package
+ */
+class Package{}
+
+/**
+ * @opt all
+ * @note Class
+ */
+class Counter extends Structural {
+ static public int counter;
+ public int getCounter();
+}
+
+/**
+ * @opt shape activeclass
+ * @opt all
+ * @note Active Class
+ */
+class RunningCounter extends Counter{}
+
+
+
+
+
diff --git a/doc/index.xml b/doc/index.xml
index 799150f..9823957 100644
--- a/doc/index.xml
+++ b/doc/index.xml
@@ -6,9 +6,12 @@
Class Diagramscd-intro
Class Diagram Operationscd-oper
Class Modellingcd-model
+Notes in Class Diagramscd-note
Class Diagram Optionscd-opt
+Specifying class Diagram Optionscd-opt-spec
Javadocs and UML class diagrams with UMLGraphDoccd-umldoc
Class Diagram Viewsviews
+Class Diagram Example: Shapesceg-shape
Class Diagram Example: Generalisation Relationshipsceg-gen
Class Diagram Example: Advanced Relationshipsceg-adv
Class Diagram Example: Relationships Inferenceceg-infer
diff --git a/doc/note.java b/doc/note.java
new file mode 100644
index 0000000..1c5944f
--- /dev/null
+++ b/doc/note.java
@@ -0,0 +1,26 @@
+/**
+ * @opt shape node
+ * @note Located in the
+ * machine room
+ * @note Sun Blade 6048
+ * @depend - - - MapLocation
+ * @depend - - - DataMine
+ */
+class Server{}
+
+/** @opt shape component */
+class MapLocation {}
+
+/** @opt shape component */
+class DataMine {}
+
+/**
+ * CPU-munching
+ * components that must
+ * run on this server
+ * @opt shape note
+ * @opt commentname
+ * @assoc - - - MapLocation
+ * @assoc - - - DataMine
+ */
+class munchComment {}
diff --git a/doc/shapes.java b/doc/shapes.java
new file mode 100644
index 0000000..c5f7718
--- /dev/null
+++ b/doc/shapes.java
@@ -0,0 +1,67 @@
+/**
+ * @hidden
+ * @opt nodefontcolor "blue"
+ */
+class UMLNoteOptions{}
+
+/**
+ * Structural Things
+ * @opt commentname
+ * @note Notes can
+ * be extended to
+ * span multiple lines
+ */
+class Structural{}
+
+/**
+ * spelling.java
+ * @opt shape component
+ * @opt commentname
+ * @note Component
+ */
+class Component extends Structural{}
+
+/** @opt shape node */
+class Node extends Structural{}
+
+/**
+ * Chain of
+ * responsibility
+ * @opt shape collaboration
+ * @opt commentname
+ * @note Collaboration
+ */
+class Collaboration extends Structural{}
+
+/**
+ * Place order
+ * @opt shape usecase
+ * @opt commentname
+ * @note Use Case
+ */
+class UseCase extends Structural{}
+
+/**
+ * Business rules
+ * @opt shape package
+ * @opt commentname
+ * @note Package
+ */
+class Package{}
+
+/**
+ * @opt all
+ * @note Class
+ */
+class Counter extends Structural {
+ static public int counter;
+ public int getCounter();
+}
+
+/**
+ * @opt shape activeclass
+ * @opt all
+ * @note Active Class
+ */
+class RunningCounter extends Counter{}
+
diff --git a/doc/ver.xml b/doc/ver.xml
index d086388..d2e7915 100644
--- a/doc/ver.xml
+++ b/doc/ver.xml
@@ -4,6 +4,9 @@
- Version 5.0 Under development
-
+
+
+- Version 5.0 2007-11-29
-
- All code now lives under
org.umlgraph.
This change requires corresponding modifications to the UMLGraph
@@ -12,9 +15,11 @@ callers.
usecase, and activeclass.
These shapes require GraphViz 1.16 or newer.
-- A new @note tag allows the annotation of elements with comments.
+
- A new
@note tag allows the annotation of elements with comments.
(Suggested by Sébastien Pierre.)
+- A new
@commentname option allows the naming of elements
+with the text of the javadoc comment.
diff --git a/doc/views.xml b/doc/views.xml
index 9d2ade4..f9a3e5c 100644
--- a/doc/views.xml
+++ b/doc/views.xml
@@ -42,7 +42,6 @@ class documentation for details on a proper regular expression specification.
unless the "output" option is specified to override it.
View inheritance
-
View classes can inherit from other view classes, allowing views to
share a set of common matches. The standard java inheritance mechanism
is used to specify inheritance.