浏览代码

Documentation: create split HTML and TOC files

Rainer Klute 9 年之前
父节点
当前提交
281d7d6404
共有 1 个文件被更改,包括 51 次插入1 次删除
  1. 51 1
      plugins/org.yakindu.sct.doc.user/build.xml

+ 51 - 1
plugins/org.yakindu.sct.doc.user/build.xml

@@ -118,7 +118,7 @@
 
 
     <!-- Generates the documentation as Eclipse help. -->
-    <target name="generate.eclipsehelp"
+    <target name="generate.eclipsehelp.old"
             description="Generates the documentation as Eclipse help from the textile (wikitext) sources."
             depends="init.wikitext">
         <wikitext.conversion src.dir="${src.dir.name}"
@@ -129,6 +129,56 @@
     </target>
 
 
+    
+    <target name="generate.eclipsehelp"
+            description="Generates the documentation as separate Eclipse help (HTML) files from their respective textile (wikitext) sources."
+            depends="init.wikitext">
+
+        <sequential>
+            <taskdef classpathref="wikitext.classpath"
+                     resource="org/eclipse/mylyn/wikitext/core/ant/tasks.properties" />
+
+            <wikitext-to-eclipse-help markupLanguage="Textile"
+                                      multipleOutputFiles="false"
+                                      navigationImages="true"
+                                      formatoutput="true"
+                                      validate="true"
+                                      failOnValidationError="true"
+                                      failOnValidationWarning="false"
+                                      title="YAKINDU Statechart Tools – Open Edition"
+                                      helpPrefix="help">
+                <fileset dir="src">
+                    <include name="**/*.textile" />
+                </fileset>
+                <stylesheet url="../css/style.css" />
+            </wikitext-to-eclipse-help>
+
+            <!-- Files have been generated in the source directory, which is bad practice. Move them to the destination
+                 directory: -->
+            <move todir="help" flatten="no" verbose="no">
+                <fileset dir="src" >
+                    <include name="**/*.html" />
+                    <include name="**/*-toc.xml" />
+                </fileset>
+            </move>
+
+            <!-- Copy the CSS files to the destination directory: -->
+            <copy todir="help/${css.dir.name}">
+                <fileset dir="${css.dir}">
+                    <include name="*" />
+                </fileset>
+            </copy>
+
+            <!-- Copy the image files to the destination directory: -->
+            <copy todir="help">
+                <fileset dir="src">
+                    <include name="**/images/*" />
+                </fileset>
+            </copy>
+        </sequential>
+    </target>
+
+
 
     <!-- Converts a Textile document into Eclipsehelp format. Produces an HTML document and a corresponding toc.xml -->
     <macrodef name="wikitext.conversion"