Skip to content

Commit f186280

Browse files
committed
add javadoc generation to ant build
1 parent b8dda07 commit f186280

File tree

6 files changed

+28
-9
lines changed

6 files changed

+28
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
bin
22
gen-src
33
mugl-schema
4+
doc/javadoc

README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ OVERVIEW
1919
graph3.xml
2020
Sample MUGL files
2121

22+
doc
23+
Documentation files. See 'BUILDING' below for instructions on how to generate the javadocs.
24+
2225
SETUP
2326

2427
After cloning this project from git, you need to also clone the 'mugl-schema' project into it, as follows:
@@ -34,6 +37,9 @@ BUILDING
3437

3538
Execute 'ant'.
3639

40+
To generate the javadocs, execute 'ant javadoc'. The output will be placed in the 'doc/javadoc' directory (which
41+
will be created if it does not exist.)
42+
3743
RUNNING
3844

3945
'ant graph2' (runs the org.multigraph.UITest program on the file 'graph2.xml')

build.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<target name="distclean">
3333
<delete dir="bin"/>
3434
<delete dir="gen-src"/>
35+
<delete dir="doc/javadoc"/>
3536
</target>
3637

3738
<target depends="init,xjc" name="build">
@@ -62,4 +63,15 @@
6263
</java>
6364
</target>
6465

66+
<target name="javadoc" depends="xjc">
67+
<mkdir dir="doc/javadoc"/>
68+
<javadoc packagenames="org.multigraph.*"
69+
destdir="doc/javadoc"
70+
windowtitle="Test API">
71+
<fileset dir="src" includes="**/*.java" />
72+
<fileset dir="gen-src" includes="**/*.java" />
73+
<doctitle><![CDATA[<h1>Multigraph</h1>]]></doctitle>
74+
</javadoc>
75+
</target>
76+
6577
</project>

src/org/multigraph/datatypes/datetime/DatetimeFormatter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ public DatetimeFormatter(String formatString) {
173173
/**
174174
* Convert a value to a string.
175175
*
176-
* @param value The value to be converted
177-
* @returns The formatted String
176+
* @param value The value to be converted
177+
* @return The formatted String
178178
*/
179179
@Override
180180
public String format(DataValue value) {
@@ -199,7 +199,7 @@ public String format(DataValue value) {
199199
*
200200
* @param c The '%' code
201201
* @param date The date value
202-
* @returns The formatted string
202+
* @return The formatted string
203203
*/
204204
private static String formatSingleChar(char c, Date date) {
205205
SingleConversionFormatter scf = charFormatters.get(c);

src/org/multigraph/datatypes/datetime/DatetimeValue.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public java.lang.String toString() {
6464

6565
/**
6666
* Comparison function.
67-
* @param x Another DatetimeValue
68-
* @returns -1, 0, or 1, according as this value is less, equal, or greater than x.
67+
* @param x Another DatetimeValue
68+
* @return -1, 0, or 1, according as this value is less, equal, or greater than x.
6969
*/
7070
@Override
7171
public int compareTo(DataValue x) {

src/org/multigraph/datatypes/number/NumberFormatter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public NumberFormatter(String formatString) {
2626
/**
2727
* Convert a value to a string.
2828
*
29-
* @param value The value to be converted
30-
* @returns The formatted String
29+
* @param value The value to be converted
30+
* @return The formatted String
3131
*/
3232
@Override
3333
public String format(DataValue value) {
@@ -46,8 +46,8 @@ public String format(DataValue value) {
4646
/**
4747
* Convert a value to a string.
4848
*
49-
* @param value The value to be converted
50-
* @returns The formatted String
49+
* @param value The value to be converted
50+
* @return The formatted String
5151
*/
5252
public String format(double value) {
5353
return String.format(mFormatString, value);

0 commit comments

Comments
 (0)