Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornickb2006-03-03 03:58:02 +0000
committernickb2006-03-03 03:58:02 +0000
commit73a802a75f39b200bbdab54935fada5140a2760e (patch)
treece716c21603bce142ad66d14f8a2a194c7339b2d /doc/org.eclipse.jet.doc/build
parent58d4e8a48c61e9a41e60ae7211d29304a196b7aa (diff)
downloadorg.eclipse.jet-73a802a75f39b200bbdab54935fada5140a2760e.tar.gz
org.eclipse.jet-73a802a75f39b200bbdab54935fada5140a2760e.tar.xz
org.eclipse.jet-73a802a75f39b200bbdab54935fada5140a2760e.zip
[130256] initial commit, JET build infra (creating SDK doc & example features); rename jet-feature
Diffstat (limited to 'doc/org.eclipse.jet.doc/build')
-rw-r--r--doc/org.eclipse.jet.doc/build/antJavadoc.sh90
-rw-r--r--doc/org.eclipse.jet.doc/build/javadoc.xml.template78
-rw-r--r--doc/org.eclipse.jet.doc/build/overview.html43
3 files changed, 211 insertions, 0 deletions
diff --git a/doc/org.eclipse.jet.doc/build/antJavadoc.sh b/doc/org.eclipse.jet.doc/build/antJavadoc.sh
new file mode 100644
index 0000000..96c8014
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/build/antJavadoc.sh
@@ -0,0 +1,90 @@
+#!/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"
+
+# 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/[ \n\t\r]*//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 emft 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:"`
+echo "Got classpath: "; echo $classpath;
+
+# 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
diff --git a/doc/org.eclipse.jet.doc/build/javadoc.xml.template b/doc/org.eclipse.jet.doc/build/javadoc.xml.template
new file mode 100644
index 0000000..9edb1bc
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/build/javadoc.xml.template
@@ -0,0 +1,78 @@
+<?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="@eclipseDir@"/>
+
+ <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}/@docjar@" dest="${javadoc.link.location}/platform/"/>
+ </target>
+
+ <target name="javadoc" depends="extractPlatformJavadoc">
+ <javadoc
+ destdir="${destDir}"
+ classpath="${classpath}"
+ overview="${overview}"
+
+ windowtitle="EMF OCL Javadoc"
+ footer="Copyright 2002, 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"
+ source="1.4"
+ splitindex="true"
+ use="true"
+ version="true">
+ <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/"/>
+
+ <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="jet" packages="@plugin@"/>
+
+ <!-- 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> \ No newline at end of file
diff --git a/doc/org.eclipse.jet.doc/build/overview.html b/doc/org.eclipse.jet.doc/build/overview.html
new file mode 100644
index 0000000..521e2ee
--- /dev/null
+++ b/doc/org.eclipse.jet.doc/build/overview.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<!--
+/**
+ * <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$
+ */
+-->
+</head>
+<meta http-equiv="Content-Type"
+content="text/html; charset=utf-8" />
+<body bgcolor="white">
+<!--
+This plug-in provides
+an <a href="org/eclipse/jet/helper/package-summary.html#details">API</a>
+for jet...
+-->
+<!-- The summary links point here when the contents are "copied". -->
+<!--
+<a name="details"></a>
+Please refer to
+the
+<a href="org/eclipse/jet/helper/package-summary.html#details">org.eclipse.jet.helper</a>
+and
+<a href="org/eclipse/jet/parser/package-summary.html#details">org.eclipse.jet.parser</a>
+package documentation for API details.
+-->
+</body>
+</html>

Back to the top