Skip to content

Commit

Permalink
Merge branch 'master' of github.com:dspinellis/UMLGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
dspinellis committed Mar 25, 2019
2 parents 75cc871 + 0967a91 commit 09576db
Show file tree
Hide file tree
Showing 72 changed files with 1,896 additions and 2,579 deletions.
58 changes: 53 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

[![Build Status](https://travis-ci.org/dspinellis/UMLGraph.svg?branch=master)](https://travis-ci.org/dspinellis/UMLGraph)

*UMLGraph* allows the declarative specification and 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).

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`).
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.
Expand All @@ -19,3 +18,52 @@ 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

Currently, only Java 8 is supported by the Doclet.

In Java 9 the JavaDoc Doclet API changed substantially, and the doclet therefore
needs to be largely rewritten.

Sorry, this has not happened yet - volunteers for this task are welcome.

## 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>

2 changes: 0 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
When UMLGraph 2.29 comes out use <i></i> for italic fonts?

http://stackoverflow.com/questions/8609546/umlgraph-not-automatic-integrated-in-javadoc

Support for all UML diagrams: state, use-case, etc.
Expand Down
52 changes: 34 additions & 18 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
<!-- import environment variables -->
<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">
<!-- Create the time stamp -->
<tstamp/>
Expand Down Expand Up @@ -119,36 +127,44 @@ class Version { public static String VERSION = "${VERSION}";}

<target name="test" depends="compile,testcompile"
description="run the regression tests" >
<java classname="org.umlgraph.test.BasicTest" fork="true">
<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">
<classpath>
<pathelement location="${env.JAVA_HOME}/lib/tools.jar"/>
<pathelement location="${build}"/>
<pathelement location="${lib}/UmlGraph.jar"/>
</classpath>
</java>
<!-- postpone failures, so we get to see the pngs -->
<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">
<arg value="-Tpng"/>
<arg value="-o"/>
<targetfile/>
<srcfile/>
<fileset dir="${testout}" includes="*.dot"/>
<mapper type="glob" from="*.dot" to="*.png"/>
<fileset dir="${testout}" includes="*.dot"/>
<mapper type="glob" from="*.dot" to="*.png"/>
</apply>
<apply executable="dot" dest="${testref}" parallel="false">
<arg value="-Tpng"/>
<arg value="-o"/>
<targetfile/>
<srcfile/>
<fileset dir="${testref}" includes="*.dot"/>
<mapper type="glob" from="*.dot" to="*.png"/>
<fileset dir="${testref}" includes="*.dot"/>
<mapper type="glob" from="*.dot" to="*.png"/>
</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 name="javadocs" depends="compile">
Expand Down
2 changes: 1 addition & 1 deletion doc/ceg-adv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SetTopController implements URLStreamHandler {
void connect() {}
}

/** @depend - <friend> - SetTopController */
/** @depend - &lt;friend&gt; - SetTopController */
class ChannelIterator {}

interface URLStreamHandler {
Expand Down
7 changes: 3 additions & 4 deletions doc/ceg-infer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,23 @@ class UMLOptions {}

class Person {
House[] houses;
List<Dog> dogs;
List&lt;Dog&gt; dogs;

public Room getFavouriteRoom(House house) {}
}

/**
* @opt inferreltype composed
*/
class House {
Map<String, Room> nameRoomMap;
Map&lt;String, Room&gt; nameRoomMap;
}

class Room {}

class Dog {
Person owner;
}

</fmtcode>
</td><td>
<img src="infer.png" alt="UML diagram with relationship inference" />
Expand Down
10 changes: 5 additions & 5 deletions doc/ceg-mv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,26 +93,26 @@ clean:

build/%.dot : %.java
mkdir -p $(dir $@)
$(jd) $(jd_flags) $(detailed_flags) -output $@ $<
$(jd) $(jd_flags) $(detailed_flags) -output $@ $&lt;

build/%-small.dot : %.java
mkdir -p $(dir $@)
$(jd) $(jd_flags) -output $@ $<
$(jd) $(jd_flags) -output $@ $&lt;

%.png : %.dot
dot -Nheight=0.2 -Elabelfontcolor=DarkSlateBlue -Elabelfontsize=8 -Tpng -o $@ $<
dot -Nheight=0.2 -Elabelfontcolor=DarkSlateBlue -Elabelfontsize=8 -Tpng -o $@ $&lt;

build/%.png : %.fig
mkdir -p $(dir $@)
fig2dev -L png -S 4 $< $@
fig2dev -L png -S 4 $&lt; $@

dot: $(dot_files)

png: $(png_files)

build/%.png : %.png
mkdir -p $(dir $@)
cp $< $@
cp $&lt; $@

# Example usage:
# make debug-java_files
Expand Down
2 changes: 1 addition & 1 deletion doc/uml-184.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async(); message(S,W,"liftReceiver"); sync();
active(S);
message(W,S,"setDialTone()");
async(); message(S,W,"*dialDigit(d)"); sync();
lconstraint(W,"{dialing.executionTime < 30s}");
lconstraint(W,"{dialing.executionTime &lt; 30s}");
active(W);
message(W,W,"routeCalls(s,n)");
inactive(W);
Expand Down
4 changes: 4 additions & 0 deletions doc/ver.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ this works well with <code>-qualify -postfixpackage</code> (and <code>-!qualifyG
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&lt;T&gt;.Inner</code>.</li>
<li>Use &lt;i&gt; 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>

Expand Down
Loading

0 comments on commit 09576db

Please sign in to comment.