terfloth@itemis.de 14 лет назад
Родитель
Сommit
1b6702812d

+ 2 - 2
plugins/org.yakindu.sct.doc.user/build.properties

@@ -1,4 +1,4 @@
 bin.includes = plugin.xml,\
                META-INF/,\
-               html/,\
-               *.xml
+               *.xml,\
+               help/

+ 81 - 0
plugins/org.yakindu.sct.doc.user/build.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project default="generate.help" basedir=".">
+
+	<property name="wikitext.standalone" location="${basedir}/lib" />
+	<property name="help.prefix" value="help" />
+	<property name="help.dir" location="${basedir}/${help.prefix}" />
+
+	<path id="wikitext.classpath">
+		<fileset dir="${wikitext.standalone}">
+			<include name="org.eclipse.mylyn.wikitext.*core*.jar" />
+		</fileset>
+	</path>
+
+	<taskdef classpathref="wikitext.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties" />
+
+	<target name="assemble.sections" description="Joins individual wiki source files so that they can be presented to the Eclipse help generator as a single file.">
+		<assemble.section.sources src.dir="${help.dir}/04_C-Code_Generator" src.list="sec_04" dest.file="c_code_generator.textile" />
+		<assemble.section.sources src.dir="${help.dir}/05_Java-Code_Generator" src.list="sec_05" dest.file="java_code_generator.textile" />
+	</target>
+
+
+	<!-- Building the master TOC (toc.xml) and registering it along with the sub-TOCs produced by this target in the plugin.xml file must still be done manually. -->
+	<!-- The help contexts file (contexts.xml) is not yet updated automatically, either. -->
+	<target name="generate.help" depends="assemble.sections" description="Runs the Eclipse help generator on the listed wiki source files">
+		<generate.section.help src.dir="${help.dir}/01_Overview" src.file="overview.textile" prefix="${help.prefix}/01_Overview" />
+		<generate.section.help src.dir="${help.dir}/02_Installation" src.file="installation.textile" prefix="${help.prefix}/02_Installation" />
+		<generate.section.help src.dir="${help.dir}/03_Statechart_Modeling_and_Simulation" src.file="modeling_simulation.textile" prefix="${help.prefix}/03_Statechart_Modeling_and_Simulation"/>
+		<generate.section.help src.dir="${help.dir}/04_C-Code_Generator" src.file="c_code_generator.textile" prefix="${help.prefix}/04_C-Code_Generator" />
+		<generate.section.help src.dir="${help.dir}/05_Java-Code_Generator" src.file="java_code_generator.textile" prefix="${help.prefix}/05_Java-Code_Generator" />
+		<generate.section.help src.dir="${help.dir}/06_UML_Transformation" src.file="uml_transformation.textile" prefix="${help.prefix}/06_UML_Transformation"/>
+		<generate.section.help src.dir="${help.dir}/07_Reference" src.file="sc_reference.textile" prefix="${help.prefix}/07_Reference" />
+	</target>
+
+	<target name="clean">
+		<delete>
+			<fileset dir="${help.dir}">
+				<include name="**/**/*.html" />
+				<include name="**/**/*toc.xml" />
+				<!-- Include joined source files produced by assemble.sections here -->
+				<include name="**/**/c_code_generator.textile" />
+				<include name="**/**/java_code_generator.textile" />
+			</fileset>
+		</delete>
+	</target>
+
+	<macrodef name="assemble.section.sources" description="Concats individual wiki source files">
+		<attribute name="src.dir" />
+		<attribute name="index.file" default="@{src.dir}/index.txt" />
+		<attribute name="src.list" />
+		<attribute name="dest.file" />
+		<sequential>
+			<loadfile srcfile="@{index.file}" property="@{src.list}">
+				<filterchain>
+					<tokenfilter>
+						<replacestring from="\n" to="," />
+					</tokenfilter>
+				</filterchain>
+			</loadfile>
+			<!-- Attribute fixlastline does not work (on the Mac). Begin wiki files with new line for now! -->
+			<concat destfile="@{src.dir}/@{dest.file}" append="false" fixlastline="yes">
+				<filelist dir="@{src.dir}" files="${@{src.list}}" />
+			</concat>
+		</sequential>
+	</macrodef>
+
+	<macrodef name="generate.section.help" description="Runs the Eclipse help generator on the provided wiki input file. Produces an HTML document and a corresponding toc.xml">
+		<attribute name="src.dir" />
+		<attribute name="src.file" />
+		<attribute name="prefix" />
+		<sequential>
+			<wikitext-to-eclipse-help markupLanguage="Textile" multipleOutputFiles="false" navigationImages="true" formatoutput="true" helpPrefix="@{prefix}">
+				<fileset dir="@{src.dir}">
+					<include name="@{src.file}" />
+				</fileset>
+				<stylesheet url="../content/PLUGINS_ROOT/PRODUCT_PLUGIN/book.css" />
+				<stylesheet url="../style.css" />
+			</wikitext-to-eclipse-help>
+		</sequential>
+	</macrodef>
+
+</project>

+ 9 - 5
plugins/org.yakindu.sct.doc.user/contexts.xml

@@ -1,20 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?NLS TYPE="org.eclipse.help.contexts"?>
 <contexts>
+   <context id="sc_editor_graphical_viewer">
+      <description>Enter short description here!</description>
+      <topic href="help/01_Overview/overview.html" label="Getting Started"/>
+   </context>
    <context id="sc_properties_entry_entrykind" title="YAKINDU Statechart Element Properties">
       <description>Enter short description of the Entry Kind property here.</description>
-      <topic href="html/reference/statechart_elements/entry.html" label="Entry Kind Property"/>
+      <topic href="help/07_Reference/sc_reference.html#EntryKind" label="Entry Kind Property"/>
    </context>
    <context id="sc_properties_state_expression" title="YAKINDU Statechart Element Properties">
       <description>Enter short description of the State Expression property here.</description>
-      <topic href="html/reference/statechart_elements/state.html#property_expression" label="State Expression Property"/>
+      <topic href="help/07_Reference/sc_reference.html#StateExpression" label="State Expression Property"/>
    </context>
    <context id="sc_properties_statechart_expression" title="YAKINDU Statechart Element Properties">
       <description>Enter short description of the Statechart Expression property here.</description>
-      <topic href="html/reference/statechart_elements/statechart.html#property_expression" label="Statechart Expression Property"/>
+      <topic href="help/07_Reference/sc_reference.html#StatechartExpression" label="Statechart Expression Property"/>
    </context>
-   <context id="sc_properties_transitioin_expression" title="YAKINDU Statechart Element Properties">
+   <context id="sc_properties_transition_expression" title="YAKINDU Statechart Element Properties">
       <description>Enter short descripton of the Transition Expression property here.</description>
-      <topic href="html/reference/statechart_elements/transition.html#property_expression" label="Transition Expression Property"/>
+      <topic href="help/07_Reference/sc_reference.html#TransitionExpression" label="Transition Expression Property"/>
    </context>
 </contexts>

+ 18 - 5
plugins/org.yakindu.sct.doc.user/plugin.xml

@@ -9,19 +9,32 @@
             primary="true">
       </toc>
       <toc
-            file="tocconcepts.xml">
+            file="help/01_Overview/overview-toc.xml"
+            primary="false">
       </toc>
       <toc
-            file="tocgettingstarted.xml">
+            file="help/02_Installation/installation-toc.xml"
+            primary="false">
       </toc>
       <toc
-            file="tocreference.xml">
+            file="help/03_Statechart_Modeling_and_Simulation/modeling_simulation-toc.xml"
+            primary="false">
       </toc>
       <toc
-            file="tocsamples.xml">
+            file="help/04_C-Code_Generator/c_code_generator-toc.xml"
+            primary="false">
       </toc>
       <toc
-            file="toctasks.xml">
+            file="help/05_Java-Code_Generator/java_code_generator-toc.xml"
+            primary="false">
+      </toc>
+      <toc
+            file="help/06_UML_Transformation/uml_transformation-toc.xml"
+            primary="false">
+      </toc>
+      <toc
+            file="help/07_Reference/sc_reference-toc.xml"
+            primary="false">
       </toc>
    </extension>
    <extension

+ 8 - 16
plugins/org.yakindu.sct.doc.user/toc.xml

@@ -1,20 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?NLS TYPE="org.eclipse.help.toc"?>
 
-<toc label="YAKINDU Statechart Tools Guide" topic="html/toc.html">
-   <topic label="Getting Started">
-      <anchor id="gettingstarted"/>
-   </topic>
-   <topic label="Concepts">
-      <anchor id="concepts"/>
-   </topic>
-   <topic label="Tasks">
-      <anchor id="tasks"/>
-   </topic>
-   <topic label="Reference">
-      <anchor id="reference"/>
-   </topic>
-   <topic label="Samples">
-      <anchor id="samples"/>
-   </topic>
+<toc label="YAKINDU Statechart Tools Guide">
+   <link toc="help/01_Overview/overview-toc.xml"/>
+   <link toc="help/02_Installation/installation-toc.xml"/>
+   <link toc="help/03_Statechart_Modeling_and_Simulation/modeling_simulation-toc.xml"/>
+   <link toc="help/04_C-Code_Generator/c_code_generator-toc.xml"/>
+   <link toc="help/05_Java-Code_Generator/java_code_generator-toc.xml"/>
+   <link toc="help/06_UML_Transformation/uml_transformation-toc.xml"/>
+   <link toc="help/07_Reference/sc_reference-toc.xml"/>
 </toc>