Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 6ca6454c8233c3fd766a76bb1064473371e6fb5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<project default="toc" basedir=".">

	<target name="init">
	</target>
	
	<target name="toc" depends="init,compile">
		<echo file="tocapi.xml"><![CDATA[
<toc label="JavaDoc">
]]></echo>
		<java classname="BuildAPITOC" classpath="." output="tocapi.xml" append="true">
			<arg value="http://download.eclipse.org/rt/ecf/3.5Test/javadoc/package-list"/>
		</java>
		<echo file="tocapi.xml" append="true"><![CDATA[
</toc>
]]></echo>
	</target>

	<target name="compile">
		<echo file="BuildAPITOC.java"><![CDATA[
import java.io.*;
import java.net.URL;
public class BuildAPITOC {
	public static void main(String[] args) throws Exception {
	    System.out.println("args[0] is "+args[0]);
	    URL url = new URL(args[0]);
		BufferedReader r = new BufferedReader(new InputStreamReader(url.openStream()));
		String line;
		try {
			while ((line = r.readLine()) != null)
				System.out.println("<topic label=\"" + line + "\" href=\"http://download.eclipse.org/rt/ecf/latest/javadoc/" + line.replace('.', '/') + "/package-summary.html\"/>");
		} finally {
			r.close();
		}
	}
}
]]></echo>
		<javac srcDir="." includes="BuildAPITOC.java"/>
	</target>
	
	<target name="clean">
		<delete>
			<fileset dir="." includes="BuildAPITOC.*,tocapi.xml"/>
		</delete>
	</target>
</project>

Back to the top