mirror of https://github.com/dspinellis/UMLGraph
Compare commits
177 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
e83df07d5f | |
|
|
e79f81666b | |
|
|
893fa38908 | |
|
|
a4fa650471 | |
|
|
606976778e | |
|
|
8d7a3e4b5c | |
|
|
2a471e5b8c | |
|
|
42c648b596 | |
|
|
5a058a3ace | |
|
|
24e5822d7b | |
|
|
7147eaa5ed | |
|
|
62acb7337b | |
|
|
de056154bd | |
|
|
27d7821666 | |
|
|
16c1937aad | |
|
|
70929da1d0 | |
|
|
6115e12837 | |
|
|
d273b6a3ef | |
|
|
cd8c3629a1 | |
|
|
c8f805bdef | |
|
|
d80597d547 | |
|
|
09576db5ae | |
|
|
75cc871a10 | |
|
|
0967a91289 | |
|
|
0ba1798ac5 | |
|
|
bab25cbe35 | |
|
|
26c9f9d1e5 | |
|
|
e93b793bd6 | |
|
|
e27eeb4bc3 | |
|
|
867dec5d9c | |
|
|
1d03695f8e | |
|
|
8b39c4614f | |
|
|
7169d40228 | |
|
|
dc18c503e9 | |
|
|
c7d8648352 | |
|
|
aa15be7405 | |
|
|
1925d2f1c7 | |
|
|
08b8976076 | |
|
|
1b29f70460 | |
|
|
2f27948475 | |
|
|
7d9f665d07 | |
|
|
9ddf84129a | |
|
|
a4ab6f179a | |
|
|
fe2c0c3df1 | |
|
|
f3e945c646 | |
|
|
141c8a9353 | |
|
|
fc1b199daf | |
|
|
1e52483a86 | |
|
|
f1be5aaee8 | |
|
|
f7df826f53 | |
|
|
644d148455 | |
|
|
e51f53b25e | |
|
|
a29ba21580 | |
|
|
bca0ceae17 | |
|
|
71f74d3093 | |
|
|
1b4c97630d | |
|
|
477d5cc58a | |
|
|
e5bc6f1f8f | |
|
|
e2595350fd | |
|
|
8806b89cd8 | |
|
|
70a7580e2c | |
|
|
cb77d617e9 | |
|
|
13bb2d54bc | |
|
|
27baa4a6be | |
|
|
3eb6f8d034 | |
|
|
b5238b3bdc | |
|
|
0477f4b82d | |
|
|
5de652cfeb | |
|
|
0e69b7a40f | |
|
|
132f389bcf | |
|
|
7cc92e6fa2 | |
|
|
40b24774eb | |
|
|
021dc34d8e | |
|
|
5cd82f641e | |
|
|
ce3847a1e6 | |
|
|
40b5a687cc | |
|
|
c0b7962170 | |
|
|
d744535438 | |
|
|
160a7db3a7 | |
|
|
5e854d5667 | |
|
|
962ad5af72 | |
|
|
e307530d8e | |
|
|
6211164ca2 | |
|
|
37dc189a29 | |
|
|
d0ede46da8 | |
|
|
30a611ec91 | |
|
|
a72c88fb70 | |
|
|
09fab1724d | |
|
|
db1a918e16 | |
|
|
ff13af7ea6 | |
|
|
c4713960af | |
|
|
a0ed8a2672 | |
|
|
c4f32a5a74 | |
|
|
86574a7824 | |
|
|
4425596017 | |
|
|
1ec3be2f98 | |
|
|
105db10e1a | |
|
|
9f25167880 | |
|
|
23e7da7ca5 | |
|
|
49a3f570bf | |
|
|
93e69a4e24 | |
|
|
ee82a7fd20 | |
|
|
17ab5f89f2 | |
|
|
9039a0011b | |
|
|
6700c90fe2 | |
|
|
691cf7fe69 | |
|
|
e2d2529ce6 | |
|
|
0a37b4e98f | |
|
|
3c92579f87 | |
|
|
43517f2a6d | |
|
|
ee39c4bca8 | |
|
|
91157698e3 | |
|
|
d88df8470f | |
|
|
e5d0ce31d3 | |
|
|
0a8e4a2481 | |
|
|
0bf2c1e440 | |
|
|
76c7c6290c | |
|
|
786d98cd71 | |
|
|
abeb6c22e0 | |
|
|
b23a483c1e | |
|
|
f687058ca3 | |
|
|
cc22b016ef | |
|
|
ade4d6dfc6 | |
|
|
d76d42066a | |
|
|
7fc14a491e | |
|
|
da4d335f38 | |
|
|
de854f562b | |
|
|
fe9ac58af1 | |
|
|
a8b1f1ff46 | |
|
|
fa40aaf731 | |
|
|
d46829bb01 | |
|
|
ac69e12d7a | |
|
|
c1d994d650 | |
|
|
52d95c3cc3 | |
|
|
8d77597da5 | |
|
|
a463b627fb | |
|
|
3bdff0e55b | |
|
|
44a146c03d | |
|
|
41d93e14f6 | |
|
|
e58589e4c0 | |
|
|
6202d34fa6 | |
|
|
0435986b92 | |
|
|
bd246d364f | |
|
|
e8b54cfde9 | |
|
|
9240c4a012 | |
|
|
14fca5b59c | |
|
|
c67864269c | |
|
|
bf757a720a | |
|
|
c713061dca | |
|
|
22f95917f4 | |
|
|
ef20511703 | |
|
|
a54b9bfc40 | |
|
|
faedc3f0ff | |
|
|
f6e263028a | |
|
|
af5f800017 | |
|
|
7621aba4df | |
|
|
37cd34d38f | |
|
|
f517c8704e | |
|
|
22d63f06b4 | |
|
|
4fe531b9d0 | |
|
|
6bedd8a96b | |
|
|
93b9f60f0d | |
|
|
22bee0462c | |
|
|
cdcbba6b74 | |
|
|
6c630e04b6 | |
|
|
b91039f798 | |
|
|
0508d2e2e8 | |
|
|
72a7eef460 | |
|
|
a000667eac | |
|
|
841067cda1 | |
|
|
ce821892f2 | |
|
|
f309d89222 | |
|
|
381301b1e3 | |
|
|
897edbda76 | |
|
|
b8a974e20f | |
|
|
c3fe00bb0c | |
|
|
8d63c48637 |
|
|
@ -1,7 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<classpath>
|
|
||||||
<classpathentry kind="src" path="src"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
|
||||||
<classpathentry kind="var" path="JDK_LIB/tools.jar"/>
|
|
||||||
<classpathentry kind="output" path="build"/>
|
|
||||||
</classpath>
|
|
||||||
|
|
@ -1,9 +1,18 @@
|
||||||
|
*.DS_Store
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
*.swp
|
||||||
|
.idea
|
||||||
.settings
|
.settings
|
||||||
build
|
.project
|
||||||
lib
|
.classpath
|
||||||
javadoc
|
|
||||||
UMLGraph-snapshot*
|
|
||||||
UMLGraph-R*
|
|
||||||
CHECKSUM.MD5
|
|
||||||
_vimrc
|
_vimrc
|
||||||
pom.xml
|
build
|
||||||
|
CHECKSUM.MD5
|
||||||
|
javadoc
|
||||||
|
lib
|
||||||
|
TAGS
|
||||||
|
target
|
||||||
|
UMLGraph-R*
|
||||||
|
UMLGraph-snapshot*
|
||||||
|
|
|
||||||
17
.project
17
.project
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>umlgraph_cvs</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
language: java
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- graphviz
|
||||||
|
|
||||||
|
install: ant
|
||||||
|
|
||||||
|
script: ant test
|
||||||
25
Makefile
25
Makefile
|
|
@ -1,14 +1,9 @@
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
|
|
||||||
VERSION:=$(shell git describe --abbrev=6 HEAD | sed 's/R//;s/_/./;s/-/./;s/-.*$$/-SNAPSHOT/')
|
VERSION:=$(shell git describe --abbrev=6 HEAD | sed 's/R//;s/_/./;s/-/./;s/-.*$$/-SNAPSHOT/')
|
||||||
TAGVERSION=$(shell echo $(VERSION) | sed 's/\./_/g')
|
|
||||||
BALL_TAR_GZ=UMLGraph-$(VERSION).tar.gz
|
BALL_TAR_GZ=UMLGraph-$(VERSION).tar.gz
|
||||||
ZIPBALL=UMLGraph-$(VERSION).zip
|
ZIPBALL=UMLGraph-$(VERSION).zip
|
||||||
DISTDIR=UMLGraph-$(VERSION)
|
DISTDIR=UMLGraph-$(VERSION)
|
||||||
WEBDIR=$(UH)/dds/pubs/web/home/sw/umlgraph-mirror
|
WEBDIR=$(UH)/dds/pubs/web/home/umlgraph
|
||||||
DOCLETSRCPATH=src/org/umlgraph/doclet
|
DOCLETSRCPATH=src/main/java/org/umlgraph/doclet
|
||||||
DOCLETSRC= \
|
DOCLETSRC= \
|
||||||
$(DOCLETSRCPATH)/ClassGraph.java \
|
$(DOCLETSRCPATH)/ClassGraph.java \
|
||||||
$(DOCLETSRCPATH)/ClassInfo.java \
|
$(DOCLETSRCPATH)/ClassInfo.java \
|
||||||
|
|
@ -17,14 +12,12 @@ DOCLETSRC= \
|
||||||
$(DOCLETSRCPATH)/UmlGraph.java \
|
$(DOCLETSRCPATH)/UmlGraph.java \
|
||||||
$(DOCLETSRCPATH)/Version.java
|
$(DOCLETSRCPATH)/Version.java
|
||||||
TESTSRC = \
|
TESTSRC = \
|
||||||
src/org/umlgraph/test/DotDiff.java \
|
src/main/java/org/umlgraph/test/DotDiff.java \
|
||||||
src/org/umlgraph/test/BasicTest.java
|
src/main/java/org/umlgraph/test/BasicTest.java
|
||||||
PICFILE=sequence.pic
|
PICFILE=sequence.pic
|
||||||
README=README.txt
|
README=README.txt
|
||||||
LICENSE=LICENSE
|
LICENSE=LICENSE
|
||||||
OTHERSRC=index.html build.xml Makefile oldversion.html
|
OTHERSRC=index.html build.xml Makefile oldversion.html
|
||||||
# Files to tag
|
|
||||||
ALLTAG=$(DOCLETSRC) $(TESTSRC) $(PICFILE) $(README) $(LICENSE) $(OTHERSRC)
|
|
||||||
# Documentation location (release)
|
# Documentation location (release)
|
||||||
ifeq ($(VERSION),snapshot)
|
ifeq ($(VERSION),snapshot)
|
||||||
DOC=snapshot-doc
|
DOC=snapshot-doc
|
||||||
|
|
@ -72,7 +65,7 @@ test:
|
||||||
ant test
|
ant test
|
||||||
|
|
||||||
testupdate:
|
testupdate:
|
||||||
sh tools/testupdate.sh
|
bash tools/testupdate.sh
|
||||||
|
|
||||||
# Create only the static HTML pages
|
# Create only the static HTML pages
|
||||||
static-web:
|
static-web:
|
||||||
|
|
@ -89,8 +82,8 @@ web: $(BALL_TAR_GZ) CHECKSUM.MD5
|
||||||
tar cf - javadoc | tar -C $(WEBDIR) -xvf -
|
tar cf - javadoc | tar -C $(WEBDIR) -xvf -
|
||||||
|
|
||||||
CHECKSUM.MD5: $(BALL_TAR_GZ) $(JARFILE)
|
CHECKSUM.MD5: $(BALL_TAR_GZ) $(JARFILE)
|
||||||
md5 legacy/UMLGraph-2.10.* legacy/UMLGraph-4.8.* UMLGraph-$(VERSION).* >CHECKSUM.MD5
|
openssl md5 legacy/UMLGraph-2.10.* legacy/UMLGraph-4.8.* UMLGraph-$(VERSION).* >CHECKSUM.MD5
|
||||||
(cd lib ; md5 UmlGraph.jar) >>CHECKSUM.MD5
|
(cd lib ; openssl md5 UmlGraph.jar) >>CHECKSUM.MD5
|
||||||
|
|
||||||
tag:
|
tags:
|
||||||
rcs -nV$(TAGVERSION): $(ALLTAG)
|
etags **/*.java
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
# UMLGraph - Declarative Drawing of UML Diagrams
|
||||||
|
|
||||||
|
*UMLGraph* allows the declarative specification and drawing of UML diagrams.
|
||||||
|
You can browse the system's documentation
|
||||||
|
through [this link](http://www.spinellis.gr/umlgraph/doc/index.html),
|
||||||
|
or print it through [this link](http://www.spinellis.gr/umlgraph/doc/indexw.html).
|
||||||
|
|
||||||
|
In order to run *UMLGraph*, you need to have [GraphViz](https://www.graphviz.org/)
|
||||||
|
installed in your system path. On most Linux distributions, this can be easily
|
||||||
|
installed using the regular package manager.
|
||||||
|
|
||||||
|
To compile the Java doclet from the source code run *ant* on the
|
||||||
|
*build.xml* file.
|
||||||
|
|
||||||
|
If you change the source code, you can run regression tests by
|
||||||
|
executing *ant test*.
|
||||||
|
|
||||||
|
Visit the project's [home page](http://www.spinellis.gr/umlgraph) for more information.
|
||||||
|
|
||||||
|
## Compatibility
|
||||||
|
|
||||||
|
If you build against Java 8, please use latest version of 5.X of the Doclet.
|
||||||
|
|
||||||
|
Since Java 9 doclet APIs where completely rewritten, the Doclet in version 6 supports only supports Java 9 and above.
|
||||||
|
|
||||||
|
## Development versions
|
||||||
|
|
||||||
|
In order to use development versions, you can use [JitPack](https://jitpack.io/#dspinellis/UMLGraph/master-SNAPSHOT).
|
||||||
|
Note that as this is compiled on demand, you may sometimes see a "Read timed out" when the package is recompiled,
|
||||||
|
and it should be fine a few seconds later. And because the master branch can change any time, you may want to use
|
||||||
|
a versioned snapshot instead (see the Jitpack documentation for details).
|
||||||
|
|
||||||
|
**Gradle**:
|
||||||
|
```
|
||||||
|
repositories { maven { url 'https://jitpack.io' } }
|
||||||
|
configurations { umlgraph }
|
||||||
|
dependencies { umlgraph 'com.github.dspinellis:UMLGraph:master-SNAPSHOT' }
|
||||||
|
javadoc {
|
||||||
|
doclet = 'org.umlgraph.doclet.UmlGraphDoc'
|
||||||
|
docletpath = configurations.umlgraph.files.asType(List)
|
||||||
|
tags("hidden:X", "opt:X", "has:X", "navhas:X", "assoc:X", "navassoc:X",
|
||||||
|
"composed:X", "navcomposed:X", "stereotype:X", "depend:X")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Maven**:
|
||||||
|
```
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>jitpack.io</id>
|
||||||
|
<url>https://jitpack.io</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
...
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.dspinellis</groupId>
|
||||||
|
<artifactId>UMLGraph</artifactId>
|
||||||
|
<version>master-SNAPSHOT</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Jar download**: <https://jitpack.io/com/github/dspinellis/UMLGraph/master-SNAPSHOT/UMLGraph-master-SNAPSHOT.jar>
|
||||||
|
|
||||||
|
## See also
|
||||||
|
* [D2: Declarative Diagraming](https://d2lang.com/) (Emphasis on aesthetics and extensionability)
|
||||||
|
* [Mermaid diagramming and charting tool](https://mermaid.js.org/) (JavaScript-based; easier syntax, good Markdown integration; interactive diagrams)
|
||||||
|
* [PlantUML](https://plantuml.com/) (Java-based; supports IDEs and more diagram types)
|
||||||
|
* [Comparison of textual diagraming systems](https://text-to-diagram.com/)
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
==UMLGraph - Declarative Drawing of UML Diagrams==
|
|
||||||
|
|
||||||
''UMLGraph'' allows the declarative specification and drawing of
|
|
||||||
UML diagrams.
|
|
||||||
You can browse the system's documentation
|
|
||||||
through [http://umlgraph.org/doc/index.html this link],
|
|
||||||
or print it through [http://umlgraph.org/doc/indexw.html this link].
|
|
||||||
|
|
||||||
To install the elements required to run ''UMLGraph'', simply copy
|
|
||||||
the contents of the ''lib'' directory to a location consistent with
|
|
||||||
your installation's conventions (for example to /usr/local/lib).
|
|
||||||
|
|
||||||
To compile the Java doclet from the source code run ''ant'' on the
|
|
||||||
''build.xml'' file.
|
|
||||||
|
|
||||||
If you change the source code, you can run regression tests by
|
|
||||||
executing ''ant test''.
|
|
||||||
|
|
||||||
Visit the project's [http://www.umlgraph.org home page] for more information.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Diomidis Spinellis - November 2005, August 2008, April 2012
|
|
||||||
21
README.txt
21
README.txt
|
|
@ -1,21 +0,0 @@
|
||||||
UMLGraph - Declarative Drawing of UML Diagrams
|
|
||||||
|
|
||||||
UMLGraph allows the declarative specification and drawing of
|
|
||||||
UML class and sequence diagrams. You can browse the system's
|
|
||||||
documentation from the doc/index.html page, or print it from
|
|
||||||
doc/indexw.html.
|
|
||||||
|
|
||||||
To install the elements required to run UMLGraph, simply copy
|
|
||||||
the contents of the lib directory to a location consistent with
|
|
||||||
your installation's conventions (for example to /usr/local/lib).
|
|
||||||
|
|
||||||
To compile the Java doclet from the source code run ant on the
|
|
||||||
build.xml file.
|
|
||||||
|
|
||||||
If you change the source code, you can run regression tests by
|
|
||||||
executing "ant test".
|
|
||||||
|
|
||||||
Project home page: http://www.umlgraph.org
|
|
||||||
GitHub page: git@github.com:dspinellis/UMLGraph.git
|
|
||||||
|
|
||||||
Diomidis Spinellis - November 2005, August 2008, April 2012
|
|
||||||
10
TODO
10
TODO
|
|
@ -1,14 +1,14 @@
|
||||||
$Id$
|
|
||||||
|
|
||||||
When UMLGraph 2.29 comes out use <i></i> for italic fonts?
|
|
||||||
|
|
||||||
http://stackoverflow.com/questions/8609546/umlgraph-not-automatic-integrated-in-javadoc
|
http://stackoverflow.com/questions/8609546/umlgraph-not-automatic-integrated-in-javadoc
|
||||||
|
|
||||||
Support for all UML diagrams: state, use-case, etc.
|
Support for all UML diagrams: state, use-case, etc.
|
||||||
|
|
||||||
State diagrams:
|
State diagrams:
|
||||||
See state-example.dot
|
See state-example.dot
|
||||||
See alsohttp://forrst.com/posts/State_Machine_Dont_abuse_the_if-1fE
|
See also http://forrst.com/posts/State_Machine_Dont_abuse_the_if-1fE
|
||||||
|
|
||||||
|
Note that Hierarchically nested states cannot be shown in GraphViz,
|
||||||
|
because you can't set shape and labels in cluster, nor can they act
|
||||||
|
as edge targets.
|
||||||
|
|
||||||
Add in UmlGraphDoc support for showing package dependencies.
|
Add in UmlGraphDoc support for showing package dependencies.
|
||||||
See http://java.dzone.com/articles/reverse-engineer-source-code-u#comment-6124
|
See http://java.dzone.com/articles/reverse-engineer-source-code-u#comment-6124
|
||||||
|
|
|
||||||
84
build.xml
84
build.xml
|
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
The specification for the Java-based umlgraph build processes.
|
The specification for the Java-based umlgraph build processes.
|
||||||
$Id$
|
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<!-- set global properties for this build -->
|
<!-- set global properties for this build -->
|
||||||
<property name="src" location="src"/>
|
<property name="src" location="src/main/java"/>
|
||||||
|
<property name="testsrc" location="src/test"/>
|
||||||
<property name="build" location="build"/>
|
<property name="build" location="build"/>
|
||||||
<property name="javadoc" location="javadoc"/>
|
<property name="javadoc" location="javadoc"/>
|
||||||
<property name="lib" location="lib"/>
|
<property name="lib" location="lib"/>
|
||||||
|
|
@ -21,12 +21,12 @@
|
||||||
<macrodef name="gitversion" description="Get git version.">
|
<macrodef name="gitversion" description="Get git version.">
|
||||||
<attribute name="outputproperty"/>
|
<attribute name="outputproperty"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<echo message="git describe --abbrev=6 => '@{outputproperty}'"/>
|
<echo message="git rev-parse --short=6 => '@{outputproperty}'"/>
|
||||||
<exec executable="git"
|
<exec executable="git"
|
||||||
failonerror="true"
|
failonerror="true"
|
||||||
outputproperty="@{outputproperty}">
|
outputproperty="@{outputproperty}">
|
||||||
<arg value="describe"/>
|
<arg value="rev-parse"/>
|
||||||
<arg value="--abbrev=6"/>
|
<arg value="--short=6"/>
|
||||||
<arg value="HEAD"/>
|
<arg value="HEAD"/>
|
||||||
<redirector>
|
<redirector>
|
||||||
<outputfilterchain>
|
<outputfilterchain>
|
||||||
|
|
@ -64,6 +64,14 @@
|
||||||
<!-- import environment variables -->
|
<!-- import environment variables -->
|
||||||
<property environment="env"/>
|
<property environment="env"/>
|
||||||
|
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${build}"/>
|
||||||
|
<delete dir="${lib}"/>
|
||||||
|
<delete dir="testdata/dot-out"/>
|
||||||
|
<delete dir="${javadoc}"/>
|
||||||
|
<delete dir="${dist}/lib"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<!-- Create the time stamp -->
|
<!-- Create the time stamp -->
|
||||||
<tstamp/>
|
<tstamp/>
|
||||||
|
|
@ -78,12 +86,12 @@
|
||||||
<target name="version">
|
<target name="version">
|
||||||
<exec executable="git"
|
<exec executable="git"
|
||||||
outputproperty="VERSION">
|
outputproperty="VERSION">
|
||||||
<arg value="describe"/>
|
<arg value="rev-parse"/>
|
||||||
<arg value="--abbrev=6"/>
|
<arg value="--short=6"/>
|
||||||
<arg value="HEAD"/>
|
<arg value="HEAD"/>
|
||||||
</exec>
|
</exec>
|
||||||
<echo>Version is ${VERSION}</echo>
|
<echo>Version is ${VERSION}</echo>
|
||||||
<echo file="src/org/umlgraph/doclet/Version.java">/* Automatically generated file */
|
<echo file="src/main/java/org/umlgraph/doclet/Version.java">/* Automatically generated file */
|
||||||
package org.umlgraph.doclet;
|
package org.umlgraph.doclet;
|
||||||
class Version { public static String VERSION = "${VERSION}";}
|
class Version { public static String VERSION = "${VERSION}";}
|
||||||
</echo>
|
</echo>
|
||||||
|
|
@ -91,8 +99,12 @@ class Version { public static String VERSION = "${VERSION}";}
|
||||||
|
|
||||||
<target name="compile" depends="init,version"
|
<target name="compile" depends="init,version"
|
||||||
description="compile the source, build library " >
|
description="compile the source, build library " >
|
||||||
<javac srcdir="${src}" destdir="${build}" debug="true" deprecation="true" >
|
<javac srcdir="${src}" destdir="${build}" debug="true"
|
||||||
|
deprecation="true" includeantruntime="false" >
|
||||||
<compilerarg value="-Xlint"/>
|
<compilerarg value="-Xlint"/>
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
|
||||||
|
</classpath>
|
||||||
</javac>
|
</javac>
|
||||||
<jar basedir="${build}" destfile="${lib}/UmlGraph.jar" includes="org/umlgraph/doclet/*.class">
|
<jar basedir="${build}" destfile="${lib}/UmlGraph.jar" includes="org/umlgraph/doclet/*.class">
|
||||||
<manifest>
|
<manifest>
|
||||||
|
|
@ -102,38 +114,57 @@ class Version { public static String VERSION = "${VERSION}";}
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="test" depends="compile"
|
<target name="testcompile" depends="init"
|
||||||
description="run the regression tests" >
|
description="compile the test code " >
|
||||||
<java classname="org.umlgraph.test.BasicTest" fork="true">
|
<javac srcdir="${testsrc}" destdir="${build}" debug="true"
|
||||||
|
deprecation="true" includeantruntime="false" >
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
|
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
|
||||||
<pathelement location="${build}"/>
|
|
||||||
<pathelement location="${lib}/UmlGraph.jar"/>
|
|
||||||
</classpath>
|
</classpath>
|
||||||
</java>
|
<compilerarg value="-Xlint"/>
|
||||||
<java classname="org.umlgraph.test.UmlDocTest" fork="true">
|
</javac>
|
||||||
<classpath>
|
</target>
|
||||||
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
|
|
||||||
<pathelement location="${build}"/>
|
<target name="test" depends="compile,testcompile"
|
||||||
<pathelement location="${lib}/UmlGraph.jar"/>
|
description="run the regression tests" >
|
||||||
</classpath>
|
<!-- postpone failures, so we get to see the pngs -->
|
||||||
</java>
|
<java classname="org.umlgraph.test.BasicTest" fork="true" resultproperty="BasicTest.exit">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
|
||||||
|
<pathelement location="${build}"/>
|
||||||
|
<pathelement location="${lib}/UmlGraph.jar"/>
|
||||||
|
</classpath>
|
||||||
|
</java>
|
||||||
|
<java classname="org.umlgraph.test.UmlDocTest" fork="true" resultproperty="UmlDocTest.exit">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
|
||||||
|
<pathelement location="${build}"/>
|
||||||
|
<pathelement location="${lib}/UmlGraph.jar"/>
|
||||||
|
</classpath>
|
||||||
|
</java>
|
||||||
<apply executable="dot" dest="${testout}" parallel="false">
|
<apply executable="dot" dest="${testout}" parallel="false">
|
||||||
<arg value="-Tpng"/>
|
<arg value="-Tpng"/>
|
||||||
<arg value="-o"/>
|
<arg value="-o"/>
|
||||||
<targetfile/>
|
<targetfile/>
|
||||||
<srcfile/>
|
<srcfile/>
|
||||||
<fileset dir="${testout}" includes="*.dot"/>
|
<fileset dir="${testout}" includes="*.dot"/>
|
||||||
<mapper type="glob" from="*.dot" to="*.png"/>
|
<mapper type="glob" from="*.dot" to="*.png"/>
|
||||||
</apply>
|
</apply>
|
||||||
<apply executable="dot" dest="${testref}" parallel="false">
|
<apply executable="dot" dest="${testref}" parallel="false">
|
||||||
<arg value="-Tpng"/>
|
<arg value="-Tpng"/>
|
||||||
<arg value="-o"/>
|
<arg value="-o"/>
|
||||||
<targetfile/>
|
<targetfile/>
|
||||||
<srcfile/>
|
<srcfile/>
|
||||||
<fileset dir="${testref}" includes="*.dot"/>
|
<fileset dir="${testref}" includes="*.dot"/>
|
||||||
<mapper type="glob" from="*.dot" to="*.png"/>
|
<mapper type="glob" from="*.dot" to="*.png"/>
|
||||||
</apply>
|
</apply>
|
||||||
|
<!-- postponed failure, so we get to see the pngs -->
|
||||||
|
<fail message="BasicTest failed">
|
||||||
|
<condition><not><equals arg1="0" arg2="${BasicTest.exit}"/></not></condition>
|
||||||
|
</fail>
|
||||||
|
<fail message="UmlDocTest failed">
|
||||||
|
<condition><not><equals arg1="0" arg2="${UmlDocTest.exit}"/></not></condition>
|
||||||
|
</fail>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="javadocs" depends="compile">
|
<target name="javadocs" depends="compile">
|
||||||
|
|
@ -141,6 +172,7 @@ class Version { public static String VERSION = "${VERSION}";}
|
||||||
<doclet name="org.umlgraph.doclet.UmlGraphDoc" path="${lib}/UmlGraph.jar">
|
<doclet name="org.umlgraph.doclet.UmlGraphDoc" path="${lib}/UmlGraph.jar">
|
||||||
<param name="-inferrel"/>
|
<param name="-inferrel"/>
|
||||||
<param name="-inferdep"/>
|
<param name="-inferdep"/>
|
||||||
|
<param name="-autosize"/>
|
||||||
<param name="-collapsible"/>
|
<param name="-collapsible"/>
|
||||||
<param name="-hide" value="java.*"/>
|
<param name="-hide" value="java.*"/>
|
||||||
<param name="-collpackages" value="java.util.*"/>
|
<param name="-collpackages" value="java.util.*"/>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||||
# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
.PS
|
.PS
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
ROOT=/cygdrive/c
|
ROOT=/cygdrive/c
|
||||||
PIC2PLOT=pic2plot
|
PIC2PLOT=pic2plot
|
||||||
GS=gs
|
GS=gs
|
||||||
DESTDIR=/dds/pubs/web/home/sw/umlgraph-mirror
|
DESTDIR=/dds/pubs/web/home/umlgraph
|
||||||
NOTETOOLS=/dds/pubs/Courses/tools
|
NOTETOOLS=/dds/pubs/Courses/tools
|
||||||
GIF := $(shell sed -n 's/.*<img *src *= *"\([^.]*\.gif\)".*/\1/p' *.xml)
|
GIF := $(shell sed -n 's/.*<img *src *= *"\([^.]*\.gif\)".*/\1/p' *.xml)
|
||||||
XML := $(wildcard *.xml)
|
XML := $(wildcard *.xml)
|
||||||
|
|
@ -39,7 +38,7 @@ DOC?=snapshot-doc
|
||||||
|
|
||||||
all: sequence.pic $(GIF) $(XML)
|
all: sequence.pic $(GIF) $(XML)
|
||||||
sh $(ROOT)/$(NOTETOOLS)/coursebib.sh bib
|
sh $(ROOT)/$(NOTETOOLS)/coursebib.sh bib
|
||||||
echo "Drawing UML Diagrams with UMLGraph" | perl $(NOTETOOLS)/thread.pl -n -h html -r -p ../index.html index ${DESTDIR}/${DOC}
|
echo "Drawing UML Diagrams with UMLGraph" | /c/Perl/bin/perl $(NOTETOOLS)/thread.pl -n -h html -r -p ../index.html index ${DESTDIR}/${DOC}
|
||||||
|
|
||||||
sequence.pic: ../sequence.pic
|
sequence.pic: ../sequence.pic
|
||||||
perl -p -e 'BEGIN {binmode(STDOUT);} s/\r//' $< >$@
|
perl -p -e 'BEGIN {binmode(STDOUT);} s/\r//' $< >$@
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
// Author: Vadim Nasardinov
|
// Author: Vadim Nasardinov
|
||||||
// Version: $Id$
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
// Author: Vadim Nasardinov
|
// Author: Vadim Nasardinov
|
||||||
// Author: Andrea Aime
|
// Author: Andrea Aime
|
||||||
// Version: $Id$
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<p>
|
<p>
|
||||||
UMLGraph was developed and is being maintained by
|
UMLGraph was developed and is being maintained by
|
||||||
|
|
@ -47,6 +46,7 @@ UMLGraph would not be in its current state without their contributions.
|
||||||
<li>Soraya Santana de la Fe</li>
|
<li>Soraya Santana de la Fe</li>
|
||||||
<li>Jonathan R. Santos</li>
|
<li>Jonathan R. Santos</li>
|
||||||
<li>Jan Schlüter</li>
|
<li>Jan Schlüter</li>
|
||||||
|
<li>Erich Schubert</li>
|
||||||
<li>Sebastian Setzer</li>
|
<li>Sebastian Setzer</li>
|
||||||
<li>Jörn Guy Süß</li>
|
<li>Jörn Guy Süß</li>
|
||||||
<li>Andreas Studer</li>
|
<li>Andreas Studer</li>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Advanced relationships
|
* Advanced relationships
|
||||||
* UML User Guide p. 137
|
* UML User Guide p. 137
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
To run the UMLGraph doclet from <em>ant</em>, use a rule,
|
To run the UMLGraph doclet from <em>ant</em>, use a rule,
|
||||||
like the following.
|
like the following.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
// $Id$
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associations with visibility
|
* Associations with visibility
|
||||||
|
|
|
||||||
11
doc/bib.bib
11
doc/bib.bib
|
|
@ -110,3 +110,14 @@
|
||||||
Note="Available online \url{http://java.dzone.com/articles/reverse-engineer-source-code-u}",
|
Note="Available online \url{http://java.dzone.com/articles/reverse-engineer-source-code-u}",
|
||||||
Author="Meera Subbarao"
|
Author="Meera Subbarao"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@CONFERENCE{SG16,
|
||||||
|
author={Seifermann, S. and Groenda, H.},
|
||||||
|
title={Survey on textual notations for the Unified Modeling Language},
|
||||||
|
journal={MODELSWARD 2016 - Proceedings of the 4th International Conference on Model-Driven Engineering and Software Development},
|
||||||
|
year={2016},
|
||||||
|
pages={28--39},
|
||||||
|
note={cited By 0},
|
||||||
|
url={https://www.cooperate-project.de/images/publications/MODELSWARD2016.pdf},
|
||||||
|
document_type={Conference Paper},
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
// $Id$
|
|
||||||
|
|
||||||
class Tyre {}
|
class Tyre {}
|
||||||
class Engine {}
|
class Engine {}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Interface and generalization relationships in Jakarta Catalina
|
* Interface and generalization relationships in Jakarta Catalina
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-7" ?>
|
<?xml version="1.0" encoding="ISO-8859-7" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
One specifies a class diagram using the Java syntax complemented by
|
One specifies a class diagram using the Java syntax complemented by
|
||||||
<a href="http://java.sun.com/j2se/javadoc/"><em>javadoc</em></a>
|
<a href="http://java.sun.com/j2se/javadoc/"><em>javadoc</em></a>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The UMLGraph class diagrams allows you to model
|
The UMLGraph class diagrams allows you to model
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
In UMLGraph you can easily add a note (comment) to an element,
|
In UMLGraph you can easily add a note (comment) to an element,
|
||||||
using the <code>@note</code> tag.
|
using the <code>@note</code> tag.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
UMLGraph's input follows the Java syntax and semantics.
|
UMLGraph's input follows the Java syntax and semantics.
|
||||||
However,
|
However,
|
||||||
|
|
@ -73,6 +72,14 @@ Example:
|
||||||
java -jar /usr/jvm/java-1.5.0/lib/UmlGraph.jar -private Simple.java
|
java -jar /usr/jvm/java-1.5.0/lib/UmlGraph.jar -private Simple.java
|
||||||
</fmtcode>
|
</fmtcode>
|
||||||
<p />
|
<p />
|
||||||
|
To generate a diagram of all classes in the package specify as arguments
|
||||||
|
to the Java invocation the name of the package and the directory where
|
||||||
|
it resides.
|
||||||
|
The following example generates a diagram of all UMLGraph classes.
|
||||||
|
<fmtcode ext="sh">
|
||||||
|
java -classpath ... org.umlgraph.doclet.UmlGraph -sourcepath src/main/java org.umlgraph.doclet
|
||||||
|
</fmtcode>
|
||||||
|
<p />
|
||||||
Specifying some packages before the list of source files will designate
|
Specifying some packages before the list of source files will designate
|
||||||
those packages as <em>local</em>.
|
those packages as <em>local</em>.
|
||||||
When you specify a package list,
|
When you specify a package list,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
Since the options are really a part of the generated graph you
|
Since the options are really a part of the generated graph you
|
||||||
want in many cases to include them in the diagram specification.
|
want in many cases to include them in the diagram specification.
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
A number of options contol the operation of UMLGraph
|
A number of options control the operation of UMLGraph
|
||||||
class diagram generator.
|
class diagram generator.
|
||||||
These can be specified on the command line, and most can also
|
These can be specified on the command line, and most can also
|
||||||
be specified through javadoc tags within the diagram, affecting all or some elements.
|
be specified through javadoc <code>@opt</code> tags within the diagram, affecting all or some elements.
|
||||||
|
Most have a negated version by prefixing an exclamation mark.
|
||||||
<p/>
|
<p/>
|
||||||
<h2>What Gets Drawn</h2> <!-- {{{1 -->
|
<h2>What Gets Drawn</h2> <!-- {{{1 -->
|
||||||
<dl>
|
<dl>
|
||||||
|
|
@ -28,8 +28,12 @@ be specified through javadoc tags within the diagram, affecting all or some elem
|
||||||
in this case it will hide everything (useful in the context of views
|
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
|
to selectively unhide some portions of the graph, see the view chapter for
|
||||||
further details). </dd>
|
further details). </dd>
|
||||||
|
<dt>-include</dt><dd>Match classes to include with a non-anchored match. This is weaker than
|
||||||
|
the <code>-hide</code> option, but can be used to include classes from foreign packages
|
||||||
|
in the package view (which would by default filter to only include package members).</dd>
|
||||||
<dt>-operations</dt><dd>Show class operations (Java methods) </dd>
|
<dt>-operations</dt><dd>Show class operations (Java methods) </dd>
|
||||||
<dt>-qualify</dt><dd>Produce fully-qualified class names. </dd>
|
<dt>-qualify</dt><dd>Produce fully-qualified class names. </dd>
|
||||||
|
<dt>-qualifyGenerics</dt><dd>Use fully-qualified class names in Java generics.</dd>
|
||||||
<dt>-types</dt><dd>Add type information to attributes and operations </dd>
|
<dt>-types</dt><dd>Add type information to attributes and operations </dd>
|
||||||
<dt>-view</dt><dd>Specify the fully qualified name of a class that contains
|
<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.
|
a view definition. Only the class diagram specified by this view will be generated.
|
||||||
|
|
@ -40,6 +44,7 @@ be specified through javadoc tags within the diagram, affecting all or some elem
|
||||||
<h2>Visual Appearance</h2> <!-- {{{1 -->
|
<h2>Visual Appearance</h2> <!-- {{{1 -->
|
||||||
<dl>
|
<dl>
|
||||||
<dt>-bgcolor</dt><dd>Specify the graph's background color. </dd>
|
<dt>-bgcolor</dt><dd>Specify the graph's background color. </dd>
|
||||||
|
<dt>-autosize</dt><dd>Fits generated graph to the width of the page/window. Defaults to true. </dd>
|
||||||
<dt>-collapsible</dt><dd>Enhance the javadoc HTML files containing UML diagrams with Javascript that provides a link for showing the (initially collapsed) diagrams. </dd>
|
<dt>-collapsible</dt><dd>Enhance the javadoc HTML files containing UML diagrams with Javascript that provides a link for showing the (initially collapsed) diagrams. </dd>
|
||||||
<dt>-edgecolor</dt><dd>Specify the color for drawing edges. </dd>
|
<dt>-edgecolor</dt><dd>Specify the color for drawing edges. </dd>
|
||||||
<dt>-edgefontcolor</dt><dd>Specify the font color to use for edge labels. </dd>
|
<dt>-edgefontcolor</dt><dd>Specify the font color to use for edge labels. </dd>
|
||||||
|
|
@ -78,9 +83,9 @@ be specified through javadoc tags within the diagram, affecting all or some elem
|
||||||
|
|
||||||
<p />
|
<p />
|
||||||
All colors can be either a symbolic name (e.g. blue),
|
All colors can be either a symbolic name (e.g. blue),
|
||||||
a tripple specifying hue-saturation-brightness as values 0-1
|
a triple specifying hue-saturation-brightness as values 0-1
|
||||||
(e.g. ".13 0.9 1"),
|
(e.g. ".13 0.9 1"),
|
||||||
or a tripple specifying red-green-blue values as hexadecimal
|
or a triple specifying red-green-blue values as hexadecimal
|
||||||
digits prefixed by a # (e.g. "#ff8020").
|
digits prefixed by a # (e.g. "#ff8020").
|
||||||
The symbolic color names are derived from the X Windows System;
|
The symbolic color names are derived from the X Windows System;
|
||||||
you can find a complete list in the
|
you can find a complete list in the
|
||||||
|
|
@ -183,10 +188,6 @@ When using <em>dot</em> to generate SVG diagrams you should specify
|
||||||
<code>UTF-8</code> as the output encoding, to have guillemots correctly
|
<code>UTF-8</code> as the output encoding, to have guillemots correctly
|
||||||
appearing in the resulting SVG.
|
appearing in the resulting SVG.
|
||||||
</dd>
|
</dd>
|
||||||
<dt>-verbose2</dt><dd>Will print on the standard output details regarding
|
|
||||||
the progress of graph generation.
|
|
||||||
(Note that -verbose is a javadoc option with a different meaning).
|
|
||||||
</dd>
|
|
||||||
</dl>
|
</dl>
|
||||||
<!-- Footer {{{1 -->
|
<!-- Footer {{{1 -->
|
||||||
</notes>
|
</notes>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
UmlGraphDoc is a standard doclet wrapper that combines
|
UmlGraphDoc is a standard doclet wrapper that combines
|
||||||
the standard doclet output (javadoc documentation) along with auto-generated
|
the standard doclet output (javadoc documentation) along with auto-generated
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<table>
|
<table>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
@ -32,7 +31,7 @@ class SetTopController implements URLStreamHandler {
|
||||||
void connect() {}
|
void connect() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @depend - <friend> - SetTopController */
|
/** @depend - <friend> - SetTopController */
|
||||||
class ChannelIterator {}
|
class ChannelIterator {}
|
||||||
|
|
||||||
interface URLStreamHandler {
|
interface URLStreamHandler {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<table>
|
<table>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<fmtcode ext="java">
|
<fmtcode ext="java">
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<table>
|
<table>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id: ceg-schema.xml,v 1.1 2005/11/23 22:21:22 dds Exp $ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The following was generated by annotating the source code of the
|
The following was generated by annotating the
|
||||||
<a href="http://www.sqo-oss.org">SQO-OSS</a> project.
|
<a href="https://github.com/istlab/Alitheia-Core/tree/master/alitheia/core/src/main/java/eu/sqooss/service/db">source code</a> of the
|
||||||
|
<a href="https://github.com/istlab/Alitheia-Core/">Alitheia Core</a> project.
|
||||||
Georgios Gousios, who created it, wrote:
|
Georgios Gousios, who created it, wrote:
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>
|
<p>
|
||||||
I've used UMLgraph to generate an E-R diagram out of the DAOs we use in SQO-OSS. I've just annotated a few classes with @assoc tags, removed the super class DAObject from all entities with sed, did some tweaking by hand in the .dot output, et voila, an E-R depicting almost 30 classes in less than 30 minutes!
|
I've used UMLgraph to generate an E-R diagram out of the DAOs we use in Alitheia Core. I've just annotated a few classes with @assoc tags, removed the super class DAObject from all entities with sed, did some tweaking by hand in the .dot output, et voila, an E-R depicting almost 30 classes in less than 30 minutes!
|
||||||
</p>
|
</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<p />
|
<p />
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<table>
|
<table>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<table>
|
<table>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<table>
|
<table>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
@ -21,7 +20,7 @@ class UMLOptions {}
|
||||||
|
|
||||||
class Person {
|
class Person {
|
||||||
House[] houses;
|
House[] houses;
|
||||||
List<Dog> dogs;
|
List<Dog> dogs;
|
||||||
|
|
||||||
public Room getFavouriteRoom(House house) {}
|
public Room getFavouriteRoom(House house) {}
|
||||||
}
|
}
|
||||||
|
|
@ -30,7 +29,7 @@ class Person {
|
||||||
* @opt inferreltype composed
|
* @opt inferreltype composed
|
||||||
*/
|
*/
|
||||||
class House {
|
class House {
|
||||||
Map<String, Room> nameRoomMap;
|
Map<String, Room> nameRoomMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Room {}
|
class Room {}
|
||||||
|
|
@ -38,7 +37,6 @@ class Room {}
|
||||||
class Dog {
|
class Dog {
|
||||||
Person owner;
|
Person owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
</fmtcode>
|
</fmtcode>
|
||||||
</td><td>
|
</td><td>
|
||||||
<img src="infer.png" alt="UML diagram with relationship inference" />
|
<img src="infer.png" alt="UML diagram with relationship inference" />
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
Vadim Nasardinov noted that an advantage of UMLGraph over many
|
Vadim Nasardinov noted that an advantage of UMLGraph over many
|
||||||
GUI-oriented UML drawing tools is the ability
|
GUI-oriented UML drawing tools is the ability
|
||||||
|
|
@ -16,7 +15,6 @@ a Makefile illustrates a way to organize this process.
|
||||||
<h2>Java Description</h2>
|
<h2>Java Description</h2>
|
||||||
<fmtcode ext="java">
|
<fmtcode ext="java">
|
||||||
// Author: Vadim Nasardinov
|
// Author: Vadim Nasardinov
|
||||||
// Version: $Id$
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -63,8 +61,7 @@ class DataOperation extends Element {}
|
||||||
<fmtcode ext="mak">
|
<fmtcode ext="mak">
|
||||||
# Author: Vadim Nasardinov (vadimn@redhat.com)
|
# Author: Vadim Nasardinov (vadimn@redhat.com)
|
||||||
# Since: 2004-05-26
|
# Since: 2004-05-26
|
||||||
# Version: $Id$
|
# See: http://www.spinellis.gr/umlgraph/doc/ceg-mv.html
|
||||||
# See: http://www.spinellis.gr/sw/umlgraph/doc/ceg-mv.html
|
|
||||||
|
|
||||||
# Requires: graphviz
|
# Requires: graphviz
|
||||||
# Requires: javadoc
|
# Requires: javadoc
|
||||||
|
|
@ -96,18 +93,18 @@ clean:
|
||||||
|
|
||||||
build/%.dot : %.java
|
build/%.dot : %.java
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
$(jd) $(jd_flags) $(detailed_flags) -output $@ $<
|
$(jd) $(jd_flags) $(detailed_flags) -output $@ $<
|
||||||
|
|
||||||
build/%-small.dot : %.java
|
build/%-small.dot : %.java
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
$(jd) $(jd_flags) -output $@ $<
|
$(jd) $(jd_flags) -output $@ $<
|
||||||
|
|
||||||
%.png : %.dot
|
%.png : %.dot
|
||||||
dot -Nheight=0.2 -Elabelfontcolor=DarkSlateBlue -Elabelfontsize=8 -Tpng -o $@ $<
|
dot -Nheight=0.2 -Elabelfontcolor=DarkSlateBlue -Elabelfontsize=8 -Tpng -o $@ $<
|
||||||
|
|
||||||
build/%.png : %.fig
|
build/%.png : %.fig
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
fig2dev -L png -S 4 $< $@
|
fig2dev -L png -S 4 $< $@
|
||||||
|
|
||||||
dot: $(dot_files)
|
dot: $(dot_files)
|
||||||
|
|
||||||
|
|
@ -115,7 +112,7 @@ png: $(png_files)
|
||||||
|
|
||||||
build/%.png : %.png
|
build/%.png : %.png
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
# Example usage:
|
# Example usage:
|
||||||
# make debug-java_files
|
# make debug-java_files
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<table>
|
<table>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<fmtcode ext="java">
|
<fmtcode ext="java">
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<table>
|
<table>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The makefile-based multiple view example can be generated by using internal
|
The makefile-based multiple view example can be generated by using internal
|
||||||
view support by means of the following sources (note the use of UmlOptions
|
view support by means of the following sources (note the use of UmlOptions
|
||||||
|
|
@ -9,7 +8,6 @@ diagrams at different detail level).
|
||||||
<fmtcode ext="java">
|
<fmtcode ext="java">
|
||||||
// Author: Vadim Nasardinov
|
// Author: Vadim Nasardinov
|
||||||
// Author: Andrea Aime
|
// Author: Andrea Aime
|
||||||
// Version: $Id$
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
Views are especially interesting in big projects, since they allow to
|
Views are especially interesting in big projects, since they allow to
|
||||||
generate package specific diagrams and overview diagrams in a quick and
|
generate package specific diagrams and overview diagrams in a quick and
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
Views are special classes that allow the generation of a custom class
|
Views are special classes that allow the generation of a custom class
|
||||||
diagram based on a set of diagram global options and a set of option
|
diagram based on a set of diagram global options and a set of option
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
// $Id$
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @opt nodefillcolor ".13 .9 1"
|
* @opt nodefillcolor ".13 .9 1"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Class stereotypes and tagged values
|
* Class stereotypes and tagged values
|
||||||
* UML User Guide p. 439
|
* UML User Guide p. 439
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
// $Id$
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @opt edgecolor "yellow"
|
* @opt edgecolor "yellow"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
Here are other programs or efforts that build on UMLGraph's
|
Here are other programs or efforts that build on UMLGraph's
|
||||||
code or ideas.
|
code or ideas.
|
||||||
|
|
@ -35,5 +34,12 @@ UMLGraph diagrams in
|
||||||
<a href="http://wiki.splitbrain.org/wiki:dokuwiki">DokuWiki</a>.</li>
|
<a href="http://wiki.splitbrain.org/wiki:dokuwiki">DokuWiki</a>.</li>
|
||||||
<li> Mykhaylo Sorochan has built on top of UMLGraph a
|
<li> Mykhaylo Sorochan has built on top of UMLGraph a
|
||||||
<a href="http://macroexpand.org/doku.php/articles:uml-sequence-diagram-dsl-txl:start">higher-level domain-specific language for specifying UML sequence diagrams</a>.</li>
|
<a href="http://macroexpand.org/doku.php/articles:uml-sequence-diagram-dsl-txl:start">higher-level domain-specific language for specifying UML sequence diagrams</a>.</li>
|
||||||
|
<li>
|
||||||
|
<a href="http://sketchlet.sourceforge.net/">Sketchlet</a> is using UMLGraph as a widget plugin. You can find a video about the Sketchlet UMLGraph widget usage at <a href="http://www.youtube.com/watch?v=H6lrgSYyzE0">http://www.youtube.com/watch?v=H6lrgSYyzE0</a>.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="http://argouml-graphviz.tigris.org/">argouml-graphviz</a>
|
||||||
|
is a plugin to let ArgoUML generate graphviz files.
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</notes>
|
</notes>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
# UML Distilled: Figure 5-2 p. 70
|
# UML Distilled: Figure 5-2 p. 70
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
.PS
|
.PS
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The following diagram, based on the diagram appearing on p. 70 of
|
The following diagram, based on the diagram appearing on p. 70 of
|
||||||
UML Distilled, contains self calls, object activation,
|
UML Distilled, contains self calls, object activation,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The following diagram, illustrates the operating system calls of
|
The following diagram, illustrates the operating system calls of
|
||||||
a typical DNS query.
|
a typical DNS query.
|
||||||
|
|
@ -17,7 +16,6 @@ drawing facility.
|
||||||
#
|
#
|
||||||
# DNS query collaboration diagram
|
# DNS query collaboration diagram
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
.PS
|
.PS
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
#
|
#
|
||||||
# DNS query collaboration diagram
|
# DNS query collaboration diagram
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
.PS
|
.PS
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Generalisation
|
* Generalisation
|
||||||
* UML User Guide p. 141
|
* UML User Guide p. 141
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Basic categorisations */
|
/* Basic categorisations */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The following sequence diagram demonstrates the use of the frame and comment elements.
|
The following sequence diagram demonstrates the use of the frame and comment elements.
|
||||||
<h2>Diagram</h2>
|
<h2>Diagram</h2>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<index>
|
<index>
|
||||||
<ch><ti>Introduction</ti><fi>intro</fi></ch>
|
<ch><ti>Introduction</ti><fi>intro</fi></ch>
|
||||||
<ch><ti>Installation</ti><fi>install</fi></ch>
|
<ch><ti>Installation</ti><fi>install</fi></ch>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Relationship inference
|
* Relationship inference
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-7" ?>
|
<?xml version="1.0" encoding="ISO-8859-7" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
To install UmlGraph follow these steps.
|
To install UmlGraph follow these steps.
|
||||||
<ol>
|
<ol>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
UMLGraph allows the declarative specification and drawing of
|
UMLGraph allows the declarative specification and drawing of
|
||||||
UML class and sequence diagrams.
|
UML class and sequence diagrams.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Schema model
|
* Schema model
|
||||||
* UML User Guide p. 112
|
* UML User Guide p. 112
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
.PS
|
.PS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
Objects do not always appear at the top of a UML sequence diagram;
|
Objects do not always appear at the top of a UML sequence diagram;
|
||||||
they are often constructed by other objects.
|
they are often constructed by other objects.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
# UML User Guide: Appendix A,p. 436
|
# UML User Guide: Appendix A,p. 436
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
.PS
|
.PS
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
.PS
|
.PS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
Let us try to improve the simple sequence diagram.
|
Let us try to improve the simple sequence diagram.
|
||||||
<fmtcode ext="pic">
|
<fmtcode ext="pic">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
One specifies a sequence diagram using <em>pic</em> macros to define
|
One specifies a sequence diagram using <em>pic</em> macros to define
|
||||||
objects and method invocations.
|
objects and method invocations.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The following calls can be used to define a sequence diagram.
|
The following calls can be used to define a sequence diagram.
|
||||||
<dl>
|
<dl>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
.PS
|
.PS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
A sequence diagram is defined in three main phases:
|
A sequence diagram is defined in three main phases:
|
||||||
<ol>
|
<ol>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
Sequence diagrams consist of objects, their lifelines
|
Sequence diagrams consist of objects, their lifelines
|
||||||
(also known as smimming lanes),
|
(also known as smimming lanes),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The value of
|
The value of
|
||||||
<em>pic</em> variables can sometimes be modified by assignment
|
<em>pic</em> variables can sometimes be modified by assignment
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||||
# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
# UML User Guide: Figure 18-2
|
# UML User Guide: Figure 18-2
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
.PS
|
.PS
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The following diagram, based on the one appearing on p. 247 of the
|
The following diagram, based on the one appearing on p. 247 of the
|
||||||
UML User Guide, illustrates the dynamic creation and destruction of
|
UML User Guide, illustrates the dynamic creation and destruction of
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
# UML User Guide: Figure 18-4
|
# UML User Guide: Figure 18-4
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
.PS
|
.PS
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The following diagram, based on Figure 18-4 appearing on p. 252 of the
|
The following diagram, based on Figure 18-4 appearing on p. 252 of the
|
||||||
UML User Guide, illustrates constraints on an object's lifeline,
|
UML User Guide, illustrates constraints on an object's lifeline,
|
||||||
|
|
@ -31,7 +30,7 @@ async(); message(S,W,"liftReceiver"); sync();
|
||||||
active(S);
|
active(S);
|
||||||
message(W,S,"setDialTone()");
|
message(W,S,"setDialTone()");
|
||||||
async(); message(S,W,"*dialDigit(d)"); sync();
|
async(); message(S,W,"*dialDigit(d)"); sync();
|
||||||
lconstraint(W,"{dialing.executionTime < 30s}");
|
lconstraint(W,"{dialing.executionTime < 30s}");
|
||||||
active(W);
|
active(W);
|
||||||
message(W,W,"routeCalls(s,n)");
|
message(W,W,"routeCalls(s,n)");
|
||||||
inactive(W);
|
inactive(W);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
# UML User Guide Figure 7-1.
|
# UML User Guide Figure 7-1.
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
.PS
|
.PS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The following diagram, based on Figure 7-1 appearing on p. 102 of the
|
The following diagram, based on Figure 7-1 appearing on p. 102 of the
|
||||||
UML User Guide, illustrates an interaction diagram with an
|
UML User Guide, illustrates an interaction diagram with an
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
# UML User Guide: Appendix A,p. 436
|
# UML User Guide: Appendix A,p. 436
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
.PS
|
.PS
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
The following diagram, based on the one appearing on p. 436 of the
|
The following diagram, based on the one appearing on p. 436 of the
|
||||||
UML User Guide, contains the most important elements
|
UML User Guide, contains the most important elements
|
||||||
|
|
|
||||||
16
doc/ver.xml
16
doc/ver.xml
|
|
@ -1,9 +1,23 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
<dl>
|
<dl>
|
||||||
|
|
||||||
<dt>Version 5.7 Under development </dt><dd>
|
<dt>Version 5.7 Under development </dt><dd>
|
||||||
|
<ul>
|
||||||
|
<li>The <code>@opt include</code> option can be used to include classes from
|
||||||
|
foreign packages in the package view (unless hidden with <code>@opt hide</code>).</li>
|
||||||
|
<li>You can now also use <code>@opt</code> in <code>package-info.java</code>.</li>
|
||||||
|
<li>Added <code>-qualifyGenerics</code> option to separately control the inclusion of
|
||||||
|
package names for the class (<code>-qualify</code>) and its generics. In particular
|
||||||
|
this works well with <code>-qualify -postfixpackage</code> (and <code>-!qualifyGenerics</code>).<br />
|
||||||
|
To get the old <code>-qualify</code> behavior, you need to add <code>-qualifyGenerics</code>,
|
||||||
|
the default is off, and it will not inherit from <code>-qualify</code>.</li>
|
||||||
|
<li>Better handling of complex names with generics and inner classes such as <code>pkg.Outer<T>.Inner</code>.</li>
|
||||||
|
<li>Use <i> tags for italic, because the old font naming approach does not work with SVG anymore.
|
||||||
|
Replace <code>-nodefontabstractname</code> and <code>-nodefontclassabstractname</code>
|
||||||
|
with a simple flag <code>-nodefontabstractitalic</code> instead.</li>
|
||||||
|
<li>Added <code>-hideprivateinner</code> to hide all private inner classes.</li>
|
||||||
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Version 5.6 2012-05-31 </dt><dd>
|
<dt>Version 5.6 2012-05-31 </dt><dd>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<!-- $Id$ -->
|
|
||||||
<notes>
|
<notes>
|
||||||
Documenting a big project often requires multiple diagrams:
|
Documenting a big project often requires multiple diagrams:
|
||||||
each to show a specific and limited portion of the system.
|
each to show a specific and limited portion of the system.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
// $Id$
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attribute and operation visility
|
* Attribute and operation visility
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<name>UMLGraph</name>
|
<name>UMLGraph</name>
|
||||||
<version>${version}</version>
|
<version>${version}</version>
|
||||||
<description>Declarative Drawing of UML Diagrams</description>
|
<description>Declarative Drawing of UML Diagrams</description>
|
||||||
<url>http://www.umlgraph.org</url>
|
<url>http://www.spinellis.gr/umlgraph</url>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,156 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.umlgraph</groupId>
|
||||||
|
<artifactId>umlgraph</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>UMLGraph</name>
|
||||||
|
<version>6.0.1-SNAPSHOT</version>
|
||||||
|
<description>Declarative Drawing of UML Diagrams</description>
|
||||||
|
<url>http://www.spinellis.gr/umlgraph</url>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>BSD License (original)</name>
|
||||||
|
<url>http://www.opensource.org/licenses/bsd-license.php</url>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<url>https://github.com/dspinellis/UMLGraph/</url>
|
||||||
|
<connection>scm:git://github.com/dspinellis/UMLGraph.git</connection>
|
||||||
|
<developerConnection>scm:git:git@github.com:dspinellis/UMLGraph.git</developerConnection>
|
||||||
|
<tag>R5_7_1</tag>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>dspinellis</id>
|
||||||
|
<name>Diomidis Spinellis</name>
|
||||||
|
<email>dds@aueb.gr</email>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.sonatype.oss</groupId>
|
||||||
|
<artifactId>oss-parent</artifactId>
|
||||||
|
<version>9</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.13.2</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.10.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>9</source>
|
||||||
|
<target>9</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>3.3.0</version>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
<mainClass>org.umlgraph.doclet.UmlGraph</mainClass>
|
||||||
|
</manifest>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
<version>3.0.0-M7</version>
|
||||||
|
<configuration>
|
||||||
|
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||||
|
<useReleaseProfile>false</useReleaseProfile>
|
||||||
|
<releaseProfiles>release</releaseProfiles>
|
||||||
|
<goals>deploy</goals>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>3.2.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>3.5.0</version>
|
||||||
|
<configuration>
|
||||||
|
<tags>
|
||||||
|
<tag>
|
||||||
|
<name>depend</name>
|
||||||
|
<placement>X</placement>
|
||||||
|
</tag>
|
||||||
|
<tag>
|
||||||
|
<name>hidden</name>
|
||||||
|
<placement>X</placement>
|
||||||
|
</tag>
|
||||||
|
<tag>
|
||||||
|
<name>opt</name>
|
||||||
|
<placement>X</placement>
|
||||||
|
</tag>
|
||||||
|
</tags>
|
||||||
|
<doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
|
||||||
|
<docletPath>${project.build.directory}${file.separator}${project.build.finalName}.jar</docletPath>
|
||||||
|
<additionalOptions>
|
||||||
|
<option>-inferrel</option>
|
||||||
|
<option>-inferdep</option>
|
||||||
|
<option>-autosize</option>
|
||||||
|
<option>-collapsible</option>
|
||||||
|
<option>--hide="java.*"</option>
|
||||||
|
<option>--collpackages=</option>
|
||||||
|
<option>-qualify</option>
|
||||||
|
<option>-postfixpackage</option>
|
||||||
|
<option>-nodefontsize 9</option>
|
||||||
|
<option>-nodefontpackagesize 7</option>
|
||||||
|
<option>--link="https://docs.oracle.com/javase/9/docs/api/"</option>
|
||||||
|
</additionalOptions>
|
||||||
|
<detectJavaApiLink>false</detectJavaApiLink>
|
||||||
|
<useStandardDocletOptions>true</useStandardDocletOptions>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadocs</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||||
# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
module org.umlgraph.doclet {
|
||||||
|
exports org.umlgraph.doclet;
|
||||||
|
opens org.umlgraph.doclet;
|
||||||
|
|
||||||
|
requires transitive jdk.javadoc;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -14,62 +14,60 @@
|
||||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.umlgraph.doclet;
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.lang.model.element.Name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class's dot-comaptible alias name (for fully qualified class names)
|
* Class's dot-compatible alias name (for fully qualified class names) and
|
||||||
* and printed information
|
* printed information
|
||||||
|
*
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
* @author <a href="http://www.spinellis.gr">Diomidis Spinellis</a>
|
* @author <a href="http://www.spinellis.gr">Diomidis Spinellis</a>
|
||||||
*/
|
*/
|
||||||
class ClassInfo {
|
class ClassInfo {
|
||||||
private static int classNumber;
|
private static int classNumber;
|
||||||
/** Alias name for the class */
|
/** Alias name for the class */
|
||||||
String name;
|
final String name;
|
||||||
/** True if the class class node has been printed */
|
/** True if the class class node has been printed */
|
||||||
boolean nodePrinted;
|
boolean nodePrinted;
|
||||||
/** True if the class class node is hidden */
|
/** True if the class class node is hidden */
|
||||||
boolean hidden;
|
boolean hidden;
|
||||||
/**
|
/**
|
||||||
* The list of classes that share a relation with this one. Contains
|
* The list of classes that share a relation with this one. Contains all the
|
||||||
* all the classes linked with a bi-directional relation , and the ones
|
* classes linked with a bi-directional relation , and the ones referred by a
|
||||||
* referred by a directed relation
|
* directed relation
|
||||||
*/
|
*/
|
||||||
Map<String, RelationPattern> relatedClasses = new HashMap<String, RelationPattern>();
|
Map<String, RelationPattern> relatedClasses = new HashMap<>();
|
||||||
|
|
||||||
ClassInfo(boolean p, boolean h) {
|
ClassInfo(boolean h) {
|
||||||
nodePrinted = p;
|
hidden = h;
|
||||||
hidden = h;
|
name = "c" + classNumber;
|
||||||
name = "c" + (new Integer(classNumber)).toString();
|
classNumber++;
|
||||||
classNumber++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addRelation(String dest, RelationType rt, RelationDirection d) {
|
public void addRelation(Name dest, RelationType rt, RelationDirection d) {
|
||||||
RelationPattern ri = relatedClasses.get(dest);
|
RelationPattern ri = relatedClasses.get(dest.toString());
|
||||||
if(ri == null) {
|
if (ri == null) {
|
||||||
ri = new RelationPattern(RelationDirection.NONE);
|
ri = new RelationPattern(RelationDirection.NONE);
|
||||||
relatedClasses.put(dest, ri);
|
relatedClasses.put(dest.toString(), ri);
|
||||||
}
|
}
|
||||||
ri.addRelation(rt, d);
|
ri.addRelation(rt, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelationPattern getRelation(String dest) {
|
public RelationPattern getRelation(CharSequence dest) {
|
||||||
return relatedClasses.get(dest);
|
return relatedClasses.get(dest.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Start numbering from zero. */
|
/** Start numbering from zero. */
|
||||||
public static void reset() {
|
public static void reset() {
|
||||||
classNumber = 0;
|
classNumber = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -12,28 +12,27 @@
|
||||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.umlgraph.doclet;
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
import com.sun.javadoc.ClassDoc;
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A ClassMatcher is used to check if a class definition matches a
|
* A ClassMatcher is used to check if a class definition matches a specific
|
||||||
* specific condition. The nature of the condition is dependent on
|
* condition. The nature of the condition is dependent on the kind of matcher
|
||||||
* the kind of matcher
|
*
|
||||||
* @author wolf
|
* @author wolf
|
||||||
*/
|
*/
|
||||||
public interface ClassMatcher {
|
public interface ClassMatcher {
|
||||||
/**
|
/**
|
||||||
* Returns the options for the specified class.
|
* Returns the options for the specified class.
|
||||||
*/
|
*/
|
||||||
public boolean matches(ClassDoc cd);
|
public boolean matches(TypeElement cd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the options for the specified class.
|
* Returns the options for the specified class.
|
||||||
*/
|
*/
|
||||||
public boolean matches(String name);
|
public boolean matches(CharSequence name);
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,210 @@
|
||||||
|
/*
|
||||||
|
* Contibuted by Andrea Aime
|
||||||
|
* (C) Copyright 2005 Diomidis Spinellis
|
||||||
|
*
|
||||||
|
* Permission to use, copy, and distribute this software and its
|
||||||
|
* documentation for any purpose and without fee is hereby granted,
|
||||||
|
* provided that the above copyright notice appear in all copies and that
|
||||||
|
* both that copyright notice and this permission notice appear in
|
||||||
|
* supporting documentation.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||||
|
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.Writer;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import jdk.javadoc.doclet.DocletEnvironment;
|
||||||
|
|
||||||
|
import javax.lang.model.element.Element;
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Matches classes that are directly connected to one of the classes matched by
|
||||||
|
* the regual expression specified. The context center is computed by regex
|
||||||
|
* lookup. Depending on the specified Options, inferred relations and
|
||||||
|
* dependencies will be used as well.
|
||||||
|
* <p>
|
||||||
|
* This class needs to perform quite a bit of computations in order to gather
|
||||||
|
* the network of class releationships, so you are allowed to reuse it should
|
||||||
|
* you
|
||||||
|
*
|
||||||
|
* @author wolf
|
||||||
|
*
|
||||||
|
* @depend - - - DevNullWriter
|
||||||
|
*/
|
||||||
|
public class ContextMatcher implements ClassMatcher {
|
||||||
|
ClassGraphHack cg;
|
||||||
|
Pattern pattern;
|
||||||
|
List<TypeElement> matched;
|
||||||
|
Set<String> visited = new HashSet<>();
|
||||||
|
/** The options will be used to decide on inference */
|
||||||
|
Options opt;
|
||||||
|
DocletEnvironment root;
|
||||||
|
boolean keepParentHide;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the context matcher
|
||||||
|
*
|
||||||
|
* @param root The root doc returned by JavaDoc
|
||||||
|
* @param pattern The pattern that will match the "center" of this
|
||||||
|
* context
|
||||||
|
* @param keepParentHide If true, parent option hide patterns will be preserved,
|
||||||
|
* so that classes hidden by the options won't be shown in
|
||||||
|
* the context
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public ContextMatcher(DocletEnvironment root, Pattern pattern, Options options, boolean keepParentHide) throws IOException {
|
||||||
|
this.pattern = pattern;
|
||||||
|
this.root = root;
|
||||||
|
this.keepParentHide = keepParentHide;
|
||||||
|
opt = (Options) options.clone();
|
||||||
|
opt.setOption(new String[] { "!hide" });
|
||||||
|
opt.setOption(new String[] { "!attributes" });
|
||||||
|
opt.setOption(new String[] { "!operations" });
|
||||||
|
this.cg = new ClassGraphHack(root, opt);
|
||||||
|
|
||||||
|
setContextCenter(pattern);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Can be used to setup a different pattern for this context matcher.
|
||||||
|
* <p>
|
||||||
|
* This can be used to speed up subsequent matching with the same global
|
||||||
|
* options, since the class network informations will be reused.
|
||||||
|
*
|
||||||
|
* @param pattern
|
||||||
|
*/
|
||||||
|
public void setContextCenter(Pattern pattern) {
|
||||||
|
// build up the classgraph printing the relations for all of the
|
||||||
|
// classes that make up the "center" of this context
|
||||||
|
this.pattern = pattern;
|
||||||
|
matched = new ArrayList<>();
|
||||||
|
for (Element cd : root.getIncludedElements()) {
|
||||||
|
if (cd instanceof TypeElement && pattern.matcher(cd.toString()).matches()) {
|
||||||
|
matched.add((TypeElement) cd);
|
||||||
|
addToGraph((TypeElement) cd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the specified class to the internal class graph along with its relations
|
||||||
|
* and dependencies, eventually inferring them, according to the Options
|
||||||
|
* specified for this matcher
|
||||||
|
*
|
||||||
|
* @param cd
|
||||||
|
*/
|
||||||
|
private void addToGraph(TypeElement cd) {
|
||||||
|
// avoid adding twice the same class, but don't rely on cg.getClassInfo
|
||||||
|
// since there are other ways to add a classInfor than printing the class
|
||||||
|
if (visited.contains(cd.toString())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
visited.add(cd.toString());
|
||||||
|
cg.printClass(cd, false);
|
||||||
|
cg.printRelations(cd);
|
||||||
|
if (opt.inferRelationships) {
|
||||||
|
cg.printInferredRelations(cd);
|
||||||
|
}
|
||||||
|
if (opt.inferDependencies) {
|
||||||
|
cg.printInferredDependencies(cd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.umlgraph.doclet.ClassMatcher#matches(TypeElement)
|
||||||
|
*/
|
||||||
|
public boolean matches(TypeElement cd) {
|
||||||
|
if (keepParentHide && opt.matchesHideExpression(cd.getQualifiedName())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if the class is matched, it's in by default.
|
||||||
|
if (matched.contains(cd)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// otherwise, add the class to the graph and see if it's associated
|
||||||
|
// with any of the matched classes using the classgraph hack
|
||||||
|
addToGraph(cd);
|
||||||
|
return matches(cd.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.umlgraph.doclet.ClassMatcher#matches(CharSequence)
|
||||||
|
*/
|
||||||
|
public boolean matches(CharSequence name) {
|
||||||
|
if (pattern.matcher(name).matches()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (TypeElement mcd : matched) {
|
||||||
|
RelationPattern rp = cg.getClassInfo(mcd, true).getRelation(name);
|
||||||
|
if (rp != null && opt.contextRelationPattern.matchesOne(rp)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A quick hack to compute class dependencies reusing ClassGraph but without
|
||||||
|
* generating output. Will be removed once the ClassGraph class will be split
|
||||||
|
* into two classes for graph computation and output generation.
|
||||||
|
*
|
||||||
|
* @author wolf
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static class ClassGraphHack extends ClassGraph {
|
||||||
|
|
||||||
|
public ClassGraphHack(DocletEnvironment root, OptionProvider optionProvider) throws IOException {
|
||||||
|
super(root, optionProvider, null);
|
||||||
|
prologue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void prologue() throws IOException {
|
||||||
|
w = new PrintWriter(new DevNullWriter());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple dev/null imitation
|
||||||
|
*
|
||||||
|
* @author wolf
|
||||||
|
*/
|
||||||
|
private static class DevNullWriter extends Writer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(char[] cbuf, int off, int len) throws IOException {
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void flush() throws IOException {
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() throws IOException {
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import jdk.javadoc.doclet.DocletEnvironment;
|
||||||
|
|
||||||
|
import javax.lang.model.element.ModuleElement;
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
import org.umlgraph.doclet.util.ElementUtil;
|
||||||
|
|
||||||
|
import com.sun.source.util.DocTrees;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A view designed for UMLDoc, filters out everything that it's not directly
|
||||||
|
* connected to the center class of the context.
|
||||||
|
* <p>
|
||||||
|
* As such, can be viewed as a simplified version of a {@linkplain View} using a
|
||||||
|
* single {@linkplain ContextMatcher}, but provides some extra configuration
|
||||||
|
* such as context highlighting and output path configuration (and it is
|
||||||
|
* specified in code rather than in javadoc comments).
|
||||||
|
*
|
||||||
|
* @author wolf
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ContextView implements OptionProvider {
|
||||||
|
|
||||||
|
private TypeElement cd;
|
||||||
|
private DocletEnvironment root;
|
||||||
|
private ContextMatcher matcher;
|
||||||
|
private Options globalOptions;
|
||||||
|
private Options myGlobalOptions;
|
||||||
|
private Options hideOptions;
|
||||||
|
private Options centerOptions;
|
||||||
|
private Options packageOptions;
|
||||||
|
private static final String[] HIDE_OPTIONS = new String[] { "hide" };
|
||||||
|
|
||||||
|
public ContextView(String outputFolder, TypeElement cd, DocletEnvironment root, Options parent) throws IOException {
|
||||||
|
this.cd = cd;
|
||||||
|
this.root = root;
|
||||||
|
ModuleElement md = ElementUtil.getModuleOf(root, cd);
|
||||||
|
String pathPrefix = Runtime.version().major() > 10 && md != null ? md.getQualifiedName().toString() + "/" : "";
|
||||||
|
String outputPath = pathPrefix + ElementUtil.getPackageOf(root, cd).getQualifiedName().toString().replace('.', '/') + "/" + cd.getSimpleName() + ".dot";
|
||||||
|
|
||||||
|
// setup options statically, so that we won't need to change them so
|
||||||
|
// often
|
||||||
|
this.globalOptions = parent.getGlobalOptions();
|
||||||
|
|
||||||
|
this.packageOptions = parent.getGlobalOptions();
|
||||||
|
this.packageOptions.showQualified = false;
|
||||||
|
|
||||||
|
this.myGlobalOptions = parent.getGlobalOptions();
|
||||||
|
this.myGlobalOptions.setOption(new String[] { "output", outputPath });
|
||||||
|
this.myGlobalOptions.setOption(HIDE_OPTIONS);
|
||||||
|
|
||||||
|
this.hideOptions = parent.getGlobalOptions();
|
||||||
|
this.hideOptions.setOption(HIDE_OPTIONS);
|
||||||
|
|
||||||
|
this.centerOptions = parent.getGlobalOptions();
|
||||||
|
this.centerOptions.nodeFillColor = "lemonChiffon";
|
||||||
|
this.centerOptions.showQualified = false;
|
||||||
|
|
||||||
|
this.matcher = new ContextMatcher(root, Pattern.compile(Pattern.quote(cd.toString())), myGlobalOptions, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContextCenter(TypeElement contextCenter) {
|
||||||
|
this.cd = contextCenter;
|
||||||
|
ModuleElement md = ElementUtil.getModuleOf(root, contextCenter);
|
||||||
|
String pathPrefix = Runtime.version().major() > 10 && md != null ? md.getQualifiedName().toString() + "/" : "";
|
||||||
|
String outputPath = pathPrefix + ElementUtil.getPackageOf(root, cd).getQualifiedName().toString().replace('.', '/') + "/" + cd.getSimpleName() + ".dot";
|
||||||
|
this.myGlobalOptions.setOption(new String[] { "output", outputPath });
|
||||||
|
matcher.setContextCenter(Pattern.compile(Pattern.quote(cd.toString())));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDisplayName() {
|
||||||
|
return "Context view for class " + cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Options getGlobalOptions() {
|
||||||
|
return myGlobalOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Options getOptionsFor(DocTrees dt, TypeElement cd) {
|
||||||
|
Options opt;
|
||||||
|
if (globalOptions.matchesHideExpression(cd.getQualifiedName())
|
||||||
|
|| !(matcher.matches(cd) || globalOptions.matchesIncludeExpression(cd.getQualifiedName()))) {
|
||||||
|
opt = hideOptions;
|
||||||
|
} else if (cd.equals(this.cd)) {
|
||||||
|
opt = centerOptions;
|
||||||
|
} else if (root.getElementUtils().getPackageOf(cd).equals(root.getElementUtils().getPackageOf(this.cd))) {
|
||||||
|
opt = packageOptions;
|
||||||
|
} else {
|
||||||
|
opt = globalOptions;
|
||||||
|
}
|
||||||
|
Options optionClone = (Options) opt.clone();
|
||||||
|
overrideForClass(optionClone, cd);
|
||||||
|
return optionClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Options getOptionsFor(CharSequence name) {
|
||||||
|
Options opt;
|
||||||
|
if (!matcher.matches(name)) {
|
||||||
|
opt = hideOptions;
|
||||||
|
} else if (name.equals(cd.getSimpleName())) {
|
||||||
|
opt = centerOptions;
|
||||||
|
} else {
|
||||||
|
opt = globalOptions;
|
||||||
|
}
|
||||||
|
Options optionClone = (Options) opt.clone();
|
||||||
|
overrideForClass(optionClone, name);
|
||||||
|
return optionClone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void overrideForClass(Options opt, TypeElement cd) {
|
||||||
|
opt.setOptions(root.getDocTrees(), cd);
|
||||||
|
if (opt.matchesHideExpression(cd.getQualifiedName())
|
||||||
|
|| !(matcher.matches(cd) || opt.matchesIncludeExpression(cd.getQualifiedName()))) {
|
||||||
|
opt.setOption(HIDE_OPTIONS);
|
||||||
|
}
|
||||||
|
if (cd.equals(this.cd)) {
|
||||||
|
opt.nodeFillColor = "lemonChiffon";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void overrideForClass(Options opt, CharSequence className) {
|
||||||
|
if (!(matcher.matches(className) || opt.matchesIncludeExpression(className))) {
|
||||||
|
opt.setOption(HIDE_OPTIONS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,101 @@
|
||||||
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to represent a font for graphviz.
|
||||||
|
* <p>
|
||||||
|
* This is a fairly complicated model, because it is rather an API into graphviz
|
||||||
|
* formatting strings rather than a standalone thing. <p> Some fonts (edge, node,
|
||||||
|
* abstract) are set on the top level elements, whereas others (class name, tag,
|
||||||
|
* package) are inserted as {@code <font>} tags, and these can be omitted if not
|
||||||
|
* set. Inheritance of properties then happens in graphviz.
|
||||||
|
*
|
||||||
|
* @author Erich Schubert
|
||||||
|
*/
|
||||||
|
public enum Font {
|
||||||
|
/** Edge label font */
|
||||||
|
EDGE, //
|
||||||
|
/** Node basic */
|
||||||
|
NODE, //
|
||||||
|
/** Normal operation font */
|
||||||
|
NORMAL, //
|
||||||
|
/** Abstract operation font */
|
||||||
|
ABSTRACT, //
|
||||||
|
/** Class name. Inherits from null. */
|
||||||
|
CLASS, //
|
||||||
|
/** Class name of abstract classes (usually italic) */
|
||||||
|
CLASS_ABSTRACT, //
|
||||||
|
/** Package names Inherits from null. */
|
||||||
|
PACKAGE, //
|
||||||
|
/** Tags Inherits from null. */
|
||||||
|
TAG;
|
||||||
|
|
||||||
|
public static final String DEFAULT_FONT;
|
||||||
|
|
||||||
|
// Static initialization of further values.
|
||||||
|
static {
|
||||||
|
// use an appropriate font depending on the current operating system
|
||||||
|
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
|
||||||
|
DEFAULT_FONT = "Arial";
|
||||||
|
} else {
|
||||||
|
DEFAULT_FONT = "Helvetica"; // TODO: can we use just "sans"?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wraps the text with the appropriate font according to the specified font type
|
||||||
|
*
|
||||||
|
* @param opt Options
|
||||||
|
* @param text Text to wrap
|
||||||
|
* @return Wrapped text
|
||||||
|
*/
|
||||||
|
public String wrap(Options opt, String text) {
|
||||||
|
if (text.isEmpty() || this == NORMAL)
|
||||||
|
return text;
|
||||||
|
String face = null;
|
||||||
|
double size = -1;
|
||||||
|
boolean italic = false;
|
||||||
|
switch (this) {
|
||||||
|
case EDGE:
|
||||||
|
case NODE:
|
||||||
|
// Not used with the wrap function.
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
case ABSTRACT:
|
||||||
|
italic = opt.nodeFontAbstractItalic;
|
||||||
|
case NORMAL:
|
||||||
|
break;
|
||||||
|
case CLASS_ABSTRACT:
|
||||||
|
italic = opt.nodeFontAbstractItalic;
|
||||||
|
case CLASS:
|
||||||
|
face = opt.nodeFontClassName;
|
||||||
|
size = opt.nodeFontClassSize;
|
||||||
|
break;
|
||||||
|
case PACKAGE:
|
||||||
|
face = opt.nodeFontPackageName;
|
||||||
|
size = opt.nodeFontPackageSize;
|
||||||
|
break;
|
||||||
|
case TAG:
|
||||||
|
face = opt.nodeFontTagName;
|
||||||
|
size = opt.nodeFontTagSize;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (face == null && size < 0 && !italic)
|
||||||
|
return text;
|
||||||
|
StringBuilder buf = new StringBuilder(text.length() + 100);
|
||||||
|
if (face != null || size > 0) {
|
||||||
|
buf.append("<font");
|
||||||
|
if (face != null)
|
||||||
|
buf.append(" face=\"").append(face).append('"');
|
||||||
|
if (size > 0)
|
||||||
|
buf.append(" point-size=\"").append(size).append('"');
|
||||||
|
buf.append('>');
|
||||||
|
}
|
||||||
|
if (italic)
|
||||||
|
buf.append("<i>");
|
||||||
|
buf.append(text);
|
||||||
|
if (italic)
|
||||||
|
buf.append("</i>");
|
||||||
|
if (face != null || size > 0)
|
||||||
|
buf.append("</font>");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import jdk.javadoc.doclet.DocletEnvironment;
|
||||||
|
|
||||||
|
import javax.lang.model.element.ElementKind;
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
import javax.lang.model.type.TypeMirror;
|
||||||
|
|
||||||
|
import org.umlgraph.doclet.util.ElementUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Matches every class that implements (directly or indirectly) an interfaces
|
||||||
|
* matched by regular expression provided.
|
||||||
|
*/
|
||||||
|
public class InterfaceMatcher implements ClassMatcher {
|
||||||
|
|
||||||
|
protected DocletEnvironment root;
|
||||||
|
protected Pattern pattern;
|
||||||
|
|
||||||
|
public InterfaceMatcher(DocletEnvironment root, Pattern pattern) {
|
||||||
|
this.root = root;
|
||||||
|
this.pattern = pattern;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean matches(TypeElement cd) {
|
||||||
|
// if it's the interface we're looking for, match
|
||||||
|
if (cd.getKind() == ElementKind.INTERFACE && pattern.matcher(cd.toString()).matches()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for each interface, recurse, since classes and interfaces
|
||||||
|
// are treated the same in the doclet API
|
||||||
|
for (TypeMirror type : cd.getInterfaces()) {
|
||||||
|
TypeElement iType = ElementUtil.getTypeElement(type);
|
||||||
|
if (iType != null && matches(iType)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// recurse on superclass, if available
|
||||||
|
TypeElement scd = ElementUtil.getTypeElement(cd.getSuperclass());
|
||||||
|
return scd == null ? false : matches(scd);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean matches(CharSequence name) {
|
||||||
|
TypeElement cd = root.getElementUtils().getTypeElement(name);
|
||||||
|
return cd == null ? false : matches(cd);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import jdk.javadoc.doclet.Doclet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A base class for declaring options. Subtypes for specific options should
|
||||||
|
* implement the {@link #process(String,List) process} method to handle
|
||||||
|
* instances of the option found on the command line.
|
||||||
|
*/
|
||||||
|
public abstract class Option implements Doclet.Option {
|
||||||
|
private final String name;
|
||||||
|
private final int argumentCount;
|
||||||
|
private final String description;
|
||||||
|
private final String parameters;
|
||||||
|
|
||||||
|
public Option(String name, boolean hasArg, String description, String parameters) {
|
||||||
|
this(name, hasArg ? 1 : 0, description, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Option(String name, int argumentCount, String description, String parameters) {
|
||||||
|
this.name = name;
|
||||||
|
this.argumentCount = argumentCount;
|
||||||
|
this.description = description;
|
||||||
|
this.parameters = parameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getArgumentCount() {
|
||||||
|
return argumentCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Kind getKind() {
|
||||||
|
return Kind.STANDARD;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getNames() {
|
||||||
|
return List.of(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getParameters() {
|
||||||
|
return argumentCount == 0 ? "" : parameters;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -12,28 +12,28 @@
|
||||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.umlgraph.doclet;
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
import com.sun.javadoc.ClassDoc;
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
import com.sun.source.util.DocTrees;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A factory class that builds Options object for general use or for a
|
* A factory class that builds Options object for general use or for a specific class
|
||||||
* specific class
|
|
||||||
*/
|
*/
|
||||||
public interface OptionProvider {
|
public interface OptionProvider {
|
||||||
/**
|
/**
|
||||||
* Returns the options for the specified class.
|
* Returns the options for the specified class.
|
||||||
*/
|
*/
|
||||||
public Options getOptionsFor(ClassDoc cd);
|
public Options getOptionsFor(DocTrees dt, TypeElement cd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the options for the specified class.
|
* Returns the options for the specified class.
|
||||||
*/
|
*/
|
||||||
public Options getOptionsFor(String name);
|
public Options getOptionsFor(CharSequence name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the global options (the class independent definition)
|
* Returns the global options (the class independent definition)
|
||||||
|
|
@ -43,16 +43,17 @@ public interface OptionProvider {
|
||||||
/**
|
/**
|
||||||
* Gets a base Options and applies the overrides for the specified class
|
* Gets a base Options and applies the overrides for the specified class
|
||||||
*/
|
*/
|
||||||
public void overrideForClass(Options opt, ClassDoc cd);
|
public void overrideForClass(Options opt, TypeElement cd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a base Options and applies the overrides for the specified class
|
* Gets a base Options and applies the overrides for the specified class
|
||||||
*/
|
*/
|
||||||
public void overrideForClass(Options opt, String className);
|
public void overrideForClass(Options opt, CharSequence className);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns user displayable name for this option provider.
|
* Returns user displayable name for this option provider.
|
||||||
* <p>Will be used to provide progress feedback on the console
|
* <p>
|
||||||
|
* Will be used to provide progress feedback on the console
|
||||||
*/
|
*/
|
||||||
public String getDisplayName();
|
public String getDisplayName();
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,33 @@
|
||||||
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
|
import jdk.javadoc.doclet.DocletEnvironment;
|
||||||
|
|
||||||
|
import javax.lang.model.element.Element;
|
||||||
|
import javax.lang.model.element.PackageElement;
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
import org.umlgraph.doclet.util.ElementUtil;
|
||||||
|
|
||||||
|
public class PackageMatcher implements ClassMatcher {
|
||||||
|
protected DocletEnvironment root;
|
||||||
|
protected PackageElement packageDoc;
|
||||||
|
|
||||||
|
public PackageMatcher(DocletEnvironment root, PackageElement packageDoc) {
|
||||||
|
this.root = root;
|
||||||
|
this.packageDoc = packageDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean matches(TypeElement cd) {
|
||||||
|
return packageDoc.equals(ElementUtil.getPackageOf(root, cd));
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean matches(CharSequence name) {
|
||||||
|
for (Element cd : packageDoc.getEnclosedElements()) {
|
||||||
|
if (cd instanceof TypeElement && ((TypeElement) cd).getQualifiedName().equals(name)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
|
import jdk.javadoc.doclet.DocletEnvironment;
|
||||||
|
|
||||||
|
import javax.lang.model.element.ModuleElement;
|
||||||
|
import javax.lang.model.element.PackageElement;
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
|
import org.umlgraph.doclet.util.ElementUtil;
|
||||||
|
|
||||||
|
import com.sun.source.util.DocTrees;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A view designed for UMLDoc, filters out everything that it's not contained in
|
||||||
|
* the specified package.
|
||||||
|
* <p>
|
||||||
|
* As such, can be viewed as a simplified version of a {@linkplain View} using a
|
||||||
|
* single {@linkplain ClassMatcher}, and provides some extra configuration such
|
||||||
|
* as output path configuration (and it is specified in code rather than in
|
||||||
|
* javadoc comments).
|
||||||
|
*
|
||||||
|
* @author wolf
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class PackageView implements OptionProvider {
|
||||||
|
|
||||||
|
private static final String[] HIDE = new String[] { "hide" };
|
||||||
|
private PackageElement pd;
|
||||||
|
private OptionProvider parent;
|
||||||
|
private ClassMatcher matcher;
|
||||||
|
private String outputPath;
|
||||||
|
private Options opt;
|
||||||
|
private DocTrees docTrees;
|
||||||
|
|
||||||
|
public PackageView(String outputFolder, PackageElement pd, DocletEnvironment root, OptionProvider parent) {
|
||||||
|
this.parent = parent;
|
||||||
|
this.pd = pd;
|
||||||
|
this.docTrees = root.getDocTrees();
|
||||||
|
this.matcher = new PackageMatcher(root, pd);
|
||||||
|
this.opt = parent.getGlobalOptions();
|
||||||
|
this.opt.setOptions(docTrees, pd);
|
||||||
|
ModuleElement md = ElementUtil.getModuleOf(root, pd);
|
||||||
|
String pathPrefix = Runtime.version().major() > 10 && md != null ? md.getQualifiedName().toString() + "/" : "";
|
||||||
|
this.outputPath = pathPrefix + pd.getQualifiedName().toString().replace('.', '/') + "/" + pd.getSimpleName().toString() + ".dot";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDisplayName() {
|
||||||
|
return "Package view for package " + pd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Options getGlobalOptions() {
|
||||||
|
Options go = parent.getGlobalOptions();
|
||||||
|
|
||||||
|
go.setOption(new String[] { "output", outputPath });
|
||||||
|
go.setOption(HIDE);
|
||||||
|
|
||||||
|
return go;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Options getOptionsFor(DocTrees dt, TypeElement cd) {
|
||||||
|
Options go = parent.getGlobalOptions();
|
||||||
|
overrideForClass(go, cd);
|
||||||
|
return go;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Options getOptionsFor(CharSequence name) {
|
||||||
|
Options go = parent.getGlobalOptions();
|
||||||
|
overrideForClass(go, name);
|
||||||
|
return go;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void overrideForClass(Options opt, TypeElement cd) {
|
||||||
|
opt.setOptions(docTrees, cd);
|
||||||
|
boolean inPackage = matcher.matches(cd);
|
||||||
|
if (inPackage) {
|
||||||
|
opt.showQualified = false;
|
||||||
|
}
|
||||||
|
boolean included = inPackage || this.opt.matchesIncludeExpression(cd.getQualifiedName());
|
||||||
|
if (!included || this.opt.matchesHideExpression(cd.getQualifiedName())) {
|
||||||
|
opt.setOption(HIDE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void overrideForClass(Options opt, CharSequence className) {
|
||||||
|
opt.showQualified = false;
|
||||||
|
boolean inPackage = matcher.matches(className);
|
||||||
|
if (inPackage)
|
||||||
|
opt.showQualified = false;
|
||||||
|
boolean included = inPackage || this.opt.matchesIncludeExpression(className);
|
||||||
|
if (!included || this.opt.matchesHideExpression(className)) {
|
||||||
|
opt.setOption(HIDE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -12,35 +12,33 @@
|
||||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
package org.umlgraph.doclet;
|
package org.umlgraph.doclet;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import com.sun.javadoc.ClassDoc;
|
import javax.lang.model.element.TypeElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Matches classes performing a regular expression match on the qualified class
|
* Matches classes performing a regular expression match on the qualified class
|
||||||
* name
|
* name
|
||||||
|
*
|
||||||
* @author wolf
|
* @author wolf
|
||||||
*/
|
*/
|
||||||
public class PatternMatcher implements ClassMatcher {
|
public class PatternMatcher implements ClassMatcher {
|
||||||
Pattern pattern;
|
Pattern pattern;
|
||||||
|
|
||||||
public PatternMatcher(Pattern pattern) {
|
public PatternMatcher(Pattern pattern) {
|
||||||
this.pattern = pattern;
|
this.pattern = pattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean matches(ClassDoc cd) {
|
public boolean matches(TypeElement cd) {
|
||||||
return matches(cd.toString());
|
return matches(cd.getQualifiedName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean matches(String name) {
|
public boolean matches(CharSequence name) {
|
||||||
Matcher matcher = pattern.matcher(name);
|
return pattern.matcher(name).matches();
|
||||||
return matcher.matches();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -9,43 +9,35 @@ public enum RelationDirection {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the current direction
|
* Adds the current direction
|
||||||
|
*
|
||||||
* @param d
|
* @param d
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public RelationDirection sum(RelationDirection d) {
|
public RelationDirection sum(RelationDirection d) {
|
||||||
if (this == NONE)
|
// Handle same and nones first:
|
||||||
return d;
|
return (this == d || d == NONE) ? this : //
|
||||||
|
this == NONE ? d : BOTH; // They are different and not none.
|
||||||
if ((this == IN && d == OUT) || (this == OUT && d == IN) || this == BOTH || d == BOTH)
|
|
||||||
return BOTH;
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if this direction "contains" the specified one, that is,
|
* Returns true if this direction "contains" the specified one, that is, either
|
||||||
* either it's equal to it, or this direction is {@link #BOTH}
|
* it's equal to it, or this direction is {@link #BOTH}
|
||||||
|
*
|
||||||
* @param d
|
* @param d
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean contains(RelationDirection d) {
|
public boolean contains(RelationDirection d) {
|
||||||
if (this == BOTH)
|
return this == BOTH ? true : (d == this);
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return d == this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inverts the direction of the relation. Turns IN into OUT and vice-versa, NONE and BOTH
|
* Inverts the direction of the relation. Turns IN into OUT and vice-versa, NONE
|
||||||
* are not changed
|
* and BOTH are not changed
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public RelationDirection inverse() {
|
public RelationDirection inverse() {
|
||||||
if (this == IN)
|
return this == IN ? OUT : this == OUT ? IN : this;
|
||||||
return OUT;
|
|
||||||
else if (this == OUT)
|
|
||||||
return IN;
|
|
||||||
else
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue