<?xml version="1.0" encoding="UTF-8"?>
<project name="Plugin Javadoc" default="javadoc">
	<property name="destDir"    value="doc"/>
	<property name="classpath"  value="bin"/>
	<property name="overview"   value="build/overview.html"/>
	<property name="eclipseDir" value="../../.."/>
	
	<property environment="env"/>
	<property name="javaHome" value="${env.JAVA_HOME}"/>
	
	<property name="javadoc.link.location" value="${eclipseDir}/javadoc"/>
	<available property="platformJavadocExists" file="${javadoc.link.location}/platform/"/>

	<target name="extractPlatformJavadoc" unless="platformJavadocExists">
		<unzip src="${eclipseDir}/plugins/org.eclipse.platform.doc.isv.jar" dest="${javadoc.link.location}/platform/"/>
	</target>
	
	<target name="javadoc" depends="extractPlatformJavadoc">
	
		<javadoc 
			destdir="${destDir}" 
			classpath="${classpath}"
			overview="${overview}"

			windowtitle="EMF Javadoc"
			footer="Copyright 2001-2006 IBM Corporation and others.&lt;br&gt; All Rights Reserved."

			access="protected" 
			additionalparam="-breakiterator -tag model:X -tag generated:X -tag ordered:X"
			author="false"
			breakiterator="true"
			charset="UTF-8"
			docencoding="UTF-8"
			nodeprecated="false"
			nodeprecatedlist="false" 
			noindex="false" 
			nonavbar="false" 
			notree="false" 
			splitindex="true" 
			use="true" 
			version="true"> 
				<arg value="-J-Xmx256m"/>
			
				<link offline="true" href="http://java.sun.com/j2se/1.5/docs/api/" packagelistLoc="${javaHome}/docs/api/"/>
				<link offline="true" href="/help/topic/org.eclipse.platform.doc.isv/reference/api/" packagelistLoc="${javadoc.link.location}/platform/reference/api/"/>
				
				<tag name="ignore"     description="ignore" enabled="false"/>
				<tag name="generated"  description="ignore" enabled="false"/>
				<tag name="model"      description="ignore" enabled="false"/>
				<tag name="modifiable" description="ignore" enabled="false"/>
				<tag name="extends"    description="ignore" enabled="false"/>
				<tag name="implements" description="ignore" enabled="false"/>
				<tag name="ordered"    description="ignore" enabled="false"/>

				<!-- If you add a @plugin@ below, don't forget to update the antjavadoc.sh file -->

				<group title="Notification"                   packages="org.eclipse.emf.common.notify:org.eclipse.emf.common.notify.impl"/>
				<group title="Command"                        packages="org.eclipse.emf.common.command"/>
				<group title="Utilities"                      packages="org.eclipse.emf.common.util"/>
				<group title="Common"                         packages="org.eclipse.emf.common"/>
				
				<group title="Common UI"                      packages="org.eclipse.emf.common.ui:org.eclipse.emf.common.ui.viewer"/>
				<group title="Common UI Cell Editors"         packages="org.eclipse.emf.common.ui.celleditor"/>
				<group title="Common UI Actions"              packages="org.eclipse.emf.common.ui.action"/>
				
				<group title="Ecore Model"                    packages="org.eclipse.emf.ecore:org.eclipse.emf.ecore.impl"/>
				<group title="Ecore Utilities"                packages="org.eclipse.emf.ecore.util"/>
				<group title="Ecore Resources"                packages="org.eclipse.emf.ecore.resource:org.eclipse.emf.ecore.resource.impl"/>
				<group title="Ecore Plugin"                   packages="org.eclipse.emf.ecore.plugin"/>
				<group title="Ecore Edit"                     packages="@org.eclipse.emf.ecore.edit@"/>
				<group title="Sample Ecore Editor"            packages="@org.eclipse.emf.ecore.editor@"/>

				<group title="Edit Framework"                 packages="org.eclipse.emf.edit"/>
				<group title="Editing Domain"                 packages="org.eclipse.emf.edit.domain"/>
				<group title="Edit Command"                   packages="org.eclipse.emf.edit.command"/>
				<group title="Provider"                       packages="org.eclipse.emf.edit.provider:org.eclipse.emf.edit.provider.resource"/>
				<group title="Edit Action"                    packages="org.eclipse.emf.edit.action"/>
				<group title="Edit UI"                        packages="@org.eclipse.emf.edit.ui@"/>
				
				<group title="Codegen"                        packages="@org.eclipse.emf.codegen@"/>
				<group title="Codegen UI"                     packages="@org.eclipse.emf.codegen.ui@"/>
				<group title="Codegen Ecore"                  packages="@org.eclipse.emf.codegen.ecore@"/>
				<group title="Codegen Ecore UI"               packages="@org.eclipse.emf.codegen.ecore.ui@"/>
				
				<group title="Converter Framework"            packages="@org.eclipse.emf.converter@:@org.eclipse.emf.exporter@:@org.eclipse.emf.importer@:@org.eclipse.emf.importer.ecore@:@org.eclipse.emf.importer.java@:@org.eclipse.emf.importer.rose@"/>
				
				<group title="Ant"                            packages="@org.eclipse.emf.ant@"/>
				
				<group title="Change Model"                   packages="org.eclipse.emf.ecore.change:org.eclipse.emf.ecore.change.impl"/>
				<group title="Change Utilities"               packages="org.eclipse.emf.ecore.change.util"/>
				<group title="Change Edit"                    packages="@org.eclipse.emf.ecore.change.edit@"/>
				
				<group title="Mapping Model"                  packages="org.eclipse.emf.mapping:org.eclipse.emf.mapping.impl:org.eclipse.emf.mapping.util"/>
				<group title="Mapping Edit"                   packages="org.eclipse.emf.mapping.command:org.eclipse.emf.mapping.domain:org.eclipse.emf.mapping.provider"/>
				<group title="Mapping Editor"                 packages="@org.eclipse.emf.mapping.ui@"/>
				
				<group title="Ecore to Ecore Mapping Model"   packages="org.eclipse.emf.mapping.ecore2ecore:org.eclipse.emf.mapping.ecore2ecore.impl:org.eclipse.emf.mapping.ecore2ecore.util"/>
				<group title="Ecore to Ecore Mapping Edit"    packages="org.eclipse.emf.mapping.ecore2ecore.provider"/>
				<group title="Ecore to Ecore Mapping Editor"  packages="@org.eclipse.emf.mapping.ecore2ecore.editor@"/>

				<group title="Ecore to XML Mapping Model"     packages="@org.eclipse.emf.mapping.ecore2xml@"/>
				<group title="Ecore to XML Mapping UI"        packages="@org.eclipse.emf.mapping.ecore2xml.ui@"/>
				
				<!-- If you add a @plugin@ above, don't forget to update the antjavadoc.sh file -->

@packagesets@
				
		</javadoc>

		<!-- make sure the doc-files are copied -->
		<macrodef name="copyDocFiles">
			<attribute name="pluginDir"/>
			<sequential>
				<copy todir="${destDir}" failonerror="false">
				        <fileset dir="@{pluginDir}/src" includes="**/doc-files/**"/>
				</copy>		
			</sequential>
		</macrodef>

@copydocfiles@

	</target>
</project>
