summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornickb2006-03-08 20:00:53 (EST)
committer nickb2006-03-08 20:00:53 (EST)
commit47917202ae97bfe98638e82f9b85babfd28e79a8 (patch)
tree5149c70c5af7ab3572edfb64f734a8f3f1536352
parent6a156043ffbc5521b1c0c51bab82c34076dce38b (diff)
downloadorg.eclipse.jet-47917202ae97bfe98638e82f9b85babfd28e79a8.zip
org.eclipse.jet-47917202ae97bfe98638e82f9b85babfd28e79a8.tar.gz
org.eclipse.jet-47917202ae97bfe98638e82f9b85babfd28e79a8.tar.bz2
[127509]
-rw-r--r--doc/org.eclipse.jet.doc/build.properties31
-rw-r--r--doc/org.eclipse.jet.doc/build.xml73
-rw-r--r--doc/org.eclipse.jet.doc/build/antJavadoc.sh94
-rw-r--r--doc/org.eclipse.jet.doc/build/javadoc.xml.template24
-rw-r--r--doc/org.eclipse.jet.doc/images/.cvsignore0
-rw-r--r--doc/org.eclipse.jet.doc/plugin.xml8
-rw-r--r--doc/org.eclipse.jet.doc/references/.cvsignore0
-rw-r--r--doc/org.eclipse.jet.doc/toc.xml6
-rw-r--r--doc/org.eclipse.jet.doc/tutorials/.cvsignore0
9 files changed, 166 insertions, 70 deletions
diff --git a/doc/org.eclipse.jet.doc/build.properties b/doc/org.eclipse.jet.doc/build.properties
index 6102f46..9c86577 100644
--- a/doc/org.eclipse.jet.doc/build.properties
+++ b/doc/org.eclipse.jet.doc/build.properties
@@ -1,32 +1 @@
-#/**
-# * <copyright>
-# *
-# * Copyright (c) 2005 IBM Corporation and others.
-# * All rights reserved. This program and the accompanying materials
-# * are made available under the terms of the Eclipse Public License v1.0
-# * which accompanies this distribution, and is available at
-# * http://www.eclipse.org/legal/epl-v10.html
-# *
-# * Contributors:
-# * IBM - Initial API and implementation
-# *
-# * </copyright>
-# *
-# * $Id$
-# */
-bin.includes = META-INF/,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- eclipse.gif,\
- eclipse.png,\
- eclipse24.gif,\
- eclipse32.gif,\
- eclipse48.gif,\
- eclipse32.png,\
- eclipse48.png,\
- eclipse_lg.gif,\
- plugin.xml,\
- plugin.properties
custom = true
diff --git a/doc/org.eclipse.jet.doc/build.xml b/doc/org.eclipse.jet.doc/build.xml
index 66efa9e..087ca89 100644
--- a/doc/org.eclipse.jet.doc/build.xml
+++ b/doc/org.eclipse.jet.doc/build.xml
@@ -4,6 +4,14 @@
<!-- Plug-in version. This is a HACK. Do not forget to update. -->
<property name="pluginVersion" value="1.0.0"/>
+ <property name="plugin" value="org.eclipse.jet"/>
+ <property name="docPlugin" value="org.eclipse.jet.doc"/>
+
+ <property name="filesToInclude" value="META-INF/,about.*,eclipse*.gif,eclipse*.png,eclipse_lg.gif,plugin.*,doc.zip,toc.xml,index/**"/>
+
+ <property name="bundleJavacSource" value="${javacSource}"/>
+ <property name="bundleJavacTarget" value="${javacTarget}"/>
+ <property name="bundleBootClasspath" value="${bootclasspath}"/>
<property name="basews" value="${ws}"/>
<property name="baseos" value="${os}"/>
<property name="basearch" value="${arch}"/>
@@ -13,25 +21,22 @@
<property name="javacFailOnError" value="false"/>
<property name="javacDebugInfo" value="on"/>
<property name="javacVerbose" value="true"/>
- <property name="compilerArg" value=""/>
<property name="javacSource" value="1.3"/>
<property name="javacTarget" value="1.2"/>
+ <property name="compilerArg" value=""/>
<path id="path_bootclasspath">
<fileset dir="${java.home}/lib">
<include name="*.jar"/>
</fileset>
</path>
<property name="bootclasspath" refid="path_bootclasspath"/>
- <property name="bundleJavacSource" value="${javacSource}"/>
- <property name="bundleJavacTarget" value="${javacTarget}"/>
- <property name="bundleBootClasspath" value="${bootclasspath}"/>
<target name="init" depends="properties">
<condition property="pluginTemp" value="${buildTempFolder}/plugins">
<isset property="buildTempFolder"/>
</condition>
<property name="pluginTemp" value="${basedir}"/>
- <condition property="build.result.folder" value="${pluginTemp}/org.eclipse.jet.doc">
+ <condition property="build.result.folder" value="${pluginTemp}/${docPlugin}">
<isset property="buildTempFolder"/>
</condition>
<property name="build.result.folder" value="${basedir}"/>
@@ -44,31 +49,33 @@
</target>
- <target name="build.update.jar" depends="init" description="Build the plug-in: org.eclipse.jet.doc for an update site.">
+ <target name="build.update.jar" depends="init" description="Build the plug-in: ${plugin} for an update site.">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<antcall target="build.jars"/>
<antcall target="gather.bin.parts">
<param name="destination.temp.folder" value="${temp.folder}/"/>
</antcall>
- <zip destfile="${plugin.destination}/org.eclipse.jet.doc_${pluginVersion}.${forceContextQualifier}.jar" basedir="${temp.folder}/org.eclipse.jet.doc_${pluginVersion}.${forceContextQualifier}" filesonly="false" whenempty="skip" update="false"/>
+ <zip destfile="${plugin.destination}/${docPlugin}_${pluginVersion}.${forceContextQualifier}.jar" basedir="${temp.folder}/${docPlugin}_${pluginVersion}.${forceContextQualifier}" filesonly="false" whenempty="skip" update="false"/>
<delete dir="${temp.folder}"/>
</target>
-
- <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
- <mkdir dir="${destination.temp.folder}/org.eclipse.jet.doc_${pluginVersion}.${forceContextQualifier}"/>
- <copy todir="${destination.temp.folder}/org.eclipse.jet.doc_${pluginVersion}.${forceContextQualifier}" failonerror="true">
- <fileset dir="${build.result.folder}"
- includes="about.*,plugin.*,eclipse*.gif,eclipse*.png,eclipse_lg.gif,index/**,META-INF/**"/>
- </copy>
- <eclipse.versionReplacer
- path="${destination.temp.folder}/org.eclipse.jet.doc_${pluginVersion}.${forceContextQualifier}"
- version="${pluginVersion}.${forceContextQualifier}"/>
- </target>
-
- <target name="build.jars" depends="init" description="Build all the jars for the plug-in: org.eclipse.jet.doc.">
- <!-- <antcall target="build.index"/> -->
+ <target name="build.jars" depends="init" description="Build all the jars for the plug-in: ${docPlugin}.">
+ <!-- Execute a shell script that will create an ant javadoc script and then run it for us -->
+ <exec executable="sh">
+ <arg value="build/antJavadoc.sh"/>
+ <arg value="${eclipse.home}/../eclipse"/>
+ </exec>
+
+ <antcall target="build.index"/>
+
+ <!-- Zip up all of the documentation artifacts - references(including javadoc), images, tutorials, etc. -->
+ <zip destfile="doc.zip" compress="true">
+ <!-- Add new folders for documentation zip here. -->
+ <zipfileset dir="references" prefix="references" excludes="**/*.internal.*"/>
+ <zipfileset dir="images" prefix="images"/>
+ <zipfileset dir="tutorials" prefix="tutorials"/>
+ </zip>
</target>
<target name="build.index" depends="init" description="Builds search index for the plug-in" if="eclipse.running">
@@ -78,6 +85,16 @@
<target name="build.sources" depends="init">
</target>
+ <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
+ <mkdir dir="${destination.temp.folder}/${docPlugin}_${pluginVersion}.${forceContextQualifier}"/>
+ <copy todir="${destination.temp.folder}/${docPlugin}_${pluginVersion}.${forceContextQualifier}" failonerror="true" overwrite="false">
+ <fileset dir="${basedir}" includes="${filesToInclude}"/>
+ </copy>
+ <eclipse.versionReplacer
+ path="${destination.temp.folder}/${docPlugin}_${pluginVersion}.${forceContextQualifier}"
+ version="${pluginVersion}.${forceContextQualifier}"/>
+ </target>
+
<target name="build.zips" depends="init">
</target>
@@ -87,18 +104,14 @@
<target name="gather.logs" depends="init" if="destination.temp.folder">
</target>
- <target name="clean" depends="init" description="Clean the plug-in: org.eclipse.jet.doc of all the zips, jars and logs created.">
- <delete file="${plugin.destination}/org.eclipse.jet.doc_${pluginVersion}.${forceContextQualifier}.jar"/>
- <delete file="${plugin.destination}/org.eclipse.jet.doc_${pluginVersion}.${forceContextQualifier}.zip"/>
+ <target name="clean" depends="init" description="Clean the plug-in: ${docPlugin} of all the zips, jars and logs created.">
+ <delete file="${plugin.destination}/${docPlugin}_${pluginVersion}.${forceContextQualifier}.jar"/>
+ <delete file="${plugin.destination}/${docPlugin}_${pluginVersion}.${forceContextQualifier}.zip"/>
<delete dir="${temp.folder}"/>
</target>
- <target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
- <eclipse.convertPath fileSystemPath="/localhome/foo/bar/baz/org.eclipse.jet.doc" property="resourcePath"/>
- <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
- </target>
- <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: org.eclipse.jet.doc.">
+ <target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: ${docPlugin}.">
<delete dir="${temp.folder}"/>
<mkdir dir="${temp.folder}"/>
<antcall target="build.jars"/>
@@ -112,7 +125,7 @@
<delete>
<fileset dir="${temp.folder}" includes="**/*.bin.log" />
</delete>
- <zip destfile="${plugin.destination}/org.eclipse.jet.doc_${pluginVersion}.${forceContextQualifier}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
+ <zip destfile="${plugin.destination}/${docPlugin}_${pluginVersion}.${forceContextQualifier}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
<delete dir="${temp.folder}"/>
</target>
diff --git a/doc/org.eclipse.jet.doc/build/antJavadoc.sh b/doc/org.eclipse.jet.doc/build/antJavadoc.sh
index 96c8014..5d42900 100644
--- a/doc/org.eclipse.jet.doc/build/antJavadoc.sh
+++ b/doc/org.eclipse.jet.doc/build/antJavadoc.sh
@@ -8,6 +8,97 @@ eclipseDir=$1
# The destination directory
destDir=$currentPath/../references/javadoc
+mkdir -p $destDir
+
+# The plugin name
+pluginName="org.eclipse.jet"
+
+# Don't execute if the destination directory has files
+#if [ -d "$destDir" ]; then
+# exit
+#fi
+
+function groupPackage
+{
+ plugin=$1
+ hasToken=`grep "@plugin@" $currentPath/javadoc.xml.template`
+ if [ "x$hasToken" != "x" ]; then
+ srcDir=$currentPath/../../$plugin/src
+ if [ -d "$srcDir" ]; then
+ packages=`find $srcDir -type f -name '*.java' -exec grep -e '^package .*;' {} \; | sed -e 's/^package *\(.*\);/\1/' | sed -e 's/[ ]*//g' | sort | uniq | xargs | sed -e 's/ /:/g'`
+ packages=`echo $packages | sed -e 's/\//\\\\\\//g' | sed -e 's/\./\\\\\./g'`
+
+ sed -e "s/\@plugin\@/${packages}/g" $currentPath/javadoc.xml.template > $currentPath/javadoc.xml.template.tmp
+ fi
+ fi
+}
+
+groupPackage $pluginName
+
+# The directory of the plugins in the order they were built
+# Original: pluginDirs=`find $eclipseDir/plugins -name @dot -printf '%T@ %p\n' | sort -n | grep org.eclipse.emf.transaction | cut -f2 -d' ' | sed -e 's/\(\/.*\)\/.*/\1/'`
+# New (eclipseDir): pluginDirs=`find $eclipseDir/plugins -name 'org.eclipse.emf.transaction*' -maxdepth 1 -type d -printf '%T@ %p\n' | sort -n | cut -f2 -d' '`
+# Finds plugins in the Workspace:
+pluginDirs=`find $currentPath/../.. -name "${pluginName}*" -maxdepth 1 -type d -printf '%T@ %p\n' | sort -n | cut -f2 -d' '`
+
+### TODO: missing emf/sdo/xsd plugins (?) in $eclipseDir - need to copy them over or reference source (?)
+### so that all classes/packages (and thus @links) can be resolved
+
+# All the jars in the plugins directory
+classpath=`find $eclipseDir/plugins -name "*.jar" -printf "%p:"`
+
+# Calculates the packagesets and the calls to copyDocFiles
+packagesets=""
+copydocfiles=""
+for pluginDir in $pluginDirs; do
+ pluginDir=`echo $pluginDir | sed -e 's/\/runtime$//g'`
+ srcDir=$pluginDir/src
+ if [ -d "$srcDir" ]; then
+ packagesets=$packagesets"<packageset dir=\"$srcDir\"><exclude name=\"$srcDir/**/doc-files/**\"/></packageset>"
+ copydocfiles=$copydocfiles"<copyDocFiles pluginDir=\"$pluginDir\"/>"
+ fi
+done
+
+# Finds the proper org.eclipse.platform.doc.isv jar
+docjar=`find $eclipseDir/plugins/ -name "org.eclipse.platform.doc.isv*.jar" -printf "%f"`
+
+if [ -f $currentPath/javadoc.xml.template ]; then
+ true;
+else
+ cp $currentPath/javadoc.xml.template $currentPath/javadoc.xml.template.tmp;
+fi
+
+# Replaces the token @packagesets@ in the template by the actual value
+packagesets=`echo $packagesets | sed -e 's/\//\\\\\\//g' | sed -e 's/\./\\\\\./g'`
+sed -e "s/\@packagesets\@/${packagesets}/g" $currentPath/javadoc.xml.template.tmp > $currentPath/javadoc.xml.template.tmp2
+# Replaces the token @copydocfiles@ in the template by the actual value
+copydocfiles=`echo $copydocfiles | sed -e 's/\//\\\\\\//g' | sed -e 's/\./\\\\\./g'`
+sed -e "s/\@copydocfiles\@/${copydocfiles}/g" $currentPath/javadoc.xml.template.tmp2 > $currentPath/javadoc.xml.template.tmp
+# Replaces the token @docjar@ in the template by the actual value
+sed -e "s/\@docjar\@/${docjar}/g" $currentPath/javadoc.xml.template.tmp > $currentPath/javadoc.xml.template.tmp2
+# Replaces the token @eclipseDir@ in the template by the actual value
+eclipseDirEsc=`echo $eclipseDir | sed -e 's/\//\\\\\//g' | sed -e 's/\./\\\\\./g'`
+sed -e "s/\@eclipseDir\@/${eclipseDirEsc}/g" $currentPath/javadoc.xml.template.tmp2 > $currentPath/javadoc.xml
+
+# Executes the ant script
+ant -f $currentPath/javadoc.xml \
+ -DdestDir="$destDir" \
+ -Dclasspath="$classpath" \
+ -DeclipseDir="$eclipseDir" \
+ -Doverview="$currentPath/overview.html"
+
+# Clean up templates
+rm -f $currentPath/javadoc.xml.template.tmp $currentPath/javadoc.xml.template.tmp2 $currentPath/javadoc.xml
+#!/bin/sh
+# The current direcotry
+currentPath=`echo "$PWD/$0" | sed -e 's/\(.*\)\/.*/\1\//' | sed -e 's/^[^\/]*$//g'`
+
+# The eclipse directory
+eclipseDir=$1
+
+# The destination directory
+destDir=$currentPath/../references/javadoc
+
# The plugin name
pluginName="org.eclipse.jet"
@@ -33,7 +124,7 @@ function groupPackage
groupPackage $pluginName
-# The directory of the emft plugins in the order they were built
+# The directory of the plugins in the order they were built
# Original: pluginDirs=`find $eclipseDir/plugins -name @dot -printf '%T@ %p\n' | sort -n | grep org.eclipse.emf.transaction | cut -f2 -d' ' | sed -e 's/\(\/.*\)\/.*/\1/'`
# New (eclipseDir): pluginDirs=`find $eclipseDir/plugins -name 'org.eclipse.emf.transaction*' -maxdepth 1 -type d -printf '%T@ %p\n' | sort -n | cut -f2 -d' '`
# Finds plugins in the Workspace:
@@ -44,7 +135,6 @@ pluginDirs=`find $currentPath/../.. -name "${pluginName}*" -maxdepth 1 -type d -
# All the jars in the plugins directory
classpath=`find $eclipseDir/plugins -name "*.jar" -printf "%p:"`
-echo "Got classpath: "; echo $classpath;
# Calculates the packagesets and the calls to copyDocFiles
packagesets=""
diff --git a/doc/org.eclipse.jet.doc/build/javadoc.xml.template b/doc/org.eclipse.jet.doc/build/javadoc.xml.template
index 9edb1bc..8a1dc93 100644
--- a/doc/org.eclipse.jet.doc/build/javadoc.xml.template
+++ b/doc/org.eclipse.jet.doc/build/javadoc.xml.template
@@ -11,17 +11,28 @@
<property name="javadoc.link.location" value="${eclipseDir}/javadoc"/>
<available property="platformJavadocExists" file="${javadoc.link.location}/platform/"/>
- <target name="extractPlatformJavadoc" unless="platformJavadocExists">
+ <!-- TODO Enable linking to the platform javadoc -->
+ <!-- <target name="extractPlatformJavadoc" unless="platformJavadocExists">
+ <exec executable="find">
+ <arg value="${eclipseDir}/.."/>
+ <arg value="-type"/>
+ <arg value="d"/>
+ <arg value="-name"/>
+ <arg value="javadoc"/>
+ </exec>
<unzip src="${eclipseDir}/@docjar@" dest="${javadoc.link.location}/platform/"/>
- </target>
+ </target> -->
+
+ <!-- TODO Enable linking to the platform javadoc -->
+ <!-- <target name="javadoc" depends="extractPlatformJavadoc"> -->
- <target name="javadoc" depends="extractPlatformJavadoc">
+ <target name="javadoc">
<javadoc
destdir="${destDir}"
classpath="${classpath}"
overview="${overview}"
- windowtitle="EMF OCL Javadoc"
+ windowtitle="EMF JET Javadoc"
footer="Copyright 2002, 2006 IBM Corporation and others.&lt;br&gt; All Rights Reserved."
access="protected"
@@ -42,7 +53,8 @@
<arg value="-J-Xmx180m"/>
<link offline="true" href="http://java.sun.com/j2se/1.4/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/"/>
+ <!-- TODO Enable link to platform documentation -->
+ <!-- <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"/>
@@ -54,7 +66,7 @@
<!-- If you add a @ plugin @ below, don't forget to update the antjavadoc.sh file -->
- <group title="jet" packages="@plugin@"/>
+ <group title="JET" packages="@plugin@"/>
<!-- If you add a @ plugin @ above, don't forget to update the antjavadoc.sh file -->
diff --git a/doc/org.eclipse.jet.doc/images/.cvsignore b/doc/org.eclipse.jet.doc/images/.cvsignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/images/.cvsignore
diff --git a/doc/org.eclipse.jet.doc/plugin.xml b/doc/org.eclipse.jet.doc/plugin.xml
index 7917fbf..7c36d0c 100644
--- a/doc/org.eclipse.jet.doc/plugin.xml
+++ b/doc/org.eclipse.jet.doc/plugin.xml
@@ -18,4 +18,10 @@
* $Id:
*/
-->
-<plugin/> \ No newline at end of file
+<plugin>
+ <extension
+ point="org.eclipse.help.toc">
+ <toc file="toc.xml" primary="true"/>
+ <index path="index"/>
+ </extension>
+</plugin> \ No newline at end of file
diff --git a/doc/org.eclipse.jet.doc/references/.cvsignore b/doc/org.eclipse.jet.doc/references/.cvsignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/references/.cvsignore
diff --git a/doc/org.eclipse.jet.doc/toc.xml b/doc/org.eclipse.jet.doc/toc.xml
new file mode 100644
index 0000000..581833b
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/toc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+
+<toc label="JET Table of Contents">
+ <topic label="Javadoc" href="references/javadoc/index.html"/>
+</toc>
diff --git a/doc/org.eclipse.jet.doc/tutorials/.cvsignore b/doc/org.eclipse.jet.doc/tutorials/.cvsignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/tutorials/.cvsignore