Quellcode durchsuchen

Refactoring of doc build script.

markus.muehlbrandt@gmail.com vor 12 Jahren
Ursprung
Commit
ba58307659

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

@@ -25,9 +25,9 @@
 -->
 	<target name="generate.help" 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_Getting_started" src.file="getting_started.textile" prefix="${help.prefix}/user/02_Getting_Started" />
-		<generate.section.help src.dir="${help.dir}/03_Tasks" src.file="tasks.textile" prefix="${help.prefix}/user/03_Tasks" />
-		<generate.section.help src.dir="${help.dir}/04_Reference" src.file="reference.textile" prefix="${help.prefix}/user/04_Reference" />
+		<generate.section.help src.dir="${help.dir}/02_Getting_started" src.file="getting_started.textile" prefix="${help.prefix}/02_Getting_Started" />
+		<generate.section.help src.dir="${help.dir}/03_Tasks" src.file="tasks.textile" prefix="${help.prefix}/03_Tasks" />
+		<generate.section.help src.dir="${help.dir}/04_Reference" src.file="reference.textile" prefix="${help.prefix}/04_Reference" />
 	</target>
 
 	<target name="clean">

+ 12 - 12
plugins/org.yakindu.sct.doc.user/help/02_Getting_started/getting_started-toc.xml

@@ -1,15 +1,15 @@
 <?xml version='1.0' encoding='utf-8' ?>
-<toc topic="help/user/02_Getting_Started/getting_started.html" label="getting_started">
-	<topic href="help/user/02_Getting_Started/getting_started.html" label="Getting started">
-		<topic href="help/user/02_Getting_Started/getting_started.html#Installation" label="Installation"></topic>
-		<topic href="help/user/02_Getting_Started/getting_started.html#Introduction" label="Introduction"></topic>
-		<topic href="help/user/02_Getting_Started/getting_started.html#CallHandlingexampleexplained" label="CallHandling example explained"></topic>
-		<topic href="help/user/02_Getting_Started/getting_started.html#Prepareaproject" label="Prepare a project"></topic>
-		<topic href="help/user/02_Getting_Started/getting_started.html#Createastatechartmodel" label="Create a statechart model"></topic>
-		<topic href="help/user/02_Getting_Started/getting_started.html#UsetheEditor" label="Use the Editor"></topic>
-		<topic href="help/user/02_Getting_Started/getting_started.html#Simulatingthemodel" label="Simulating the model"></topic>
-		<topic href="help/user/02_Getting_Started/getting_started.html#GenerateJavacode" label="Generate Java code"></topic>
-		<topic href="help/user/02_Getting_Started/getting_started.html#Integrationwithclientcode" label="Integration with client code"></topic>
-		<topic href="help/user/02_Getting_Started/getting_started.html#Weblinks" label="Weblinks"></topic>
+<toc topic="help/02_Getting_Started/getting_started.html" label="getting_started">
+	<topic href="help/02_Getting_Started/getting_started.html" label="Getting started">
+		<topic href="help/02_Getting_Started/getting_started.html#Installation" label="Installation"></topic>
+		<topic href="help/02_Getting_Started/getting_started.html#Introduction" label="Introduction"></topic>
+		<topic href="help/02_Getting_Started/getting_started.html#CallHandlingexampleexplained" label="CallHandling example explained"></topic>
+		<topic href="help/02_Getting_Started/getting_started.html#Prepareaproject" label="Prepare a project"></topic>
+		<topic href="help/02_Getting_Started/getting_started.html#Createastatechartmodel" label="Create a statechart model"></topic>
+		<topic href="help/02_Getting_Started/getting_started.html#UsetheEditor" label="Use the Editor"></topic>
+		<topic href="help/02_Getting_Started/getting_started.html#Simulatingthemodel" label="Simulating the model"></topic>
+		<topic href="help/02_Getting_Started/getting_started.html#GenerateJavacode" label="Generate Java code"></topic>
+		<topic href="help/02_Getting_Started/getting_started.html#Integrationwithclientcode" label="Integration with client code"></topic>
+		<topic href="help/02_Getting_Started/getting_started.html#Weblinks" label="Weblinks"></topic>
 	</topic>
 </toc>

Datei-Diff unterdrückt, da er zu groß ist
+ 5 - 5
plugins/org.yakindu.sct.doc.user/help/02_Getting_started/getting_started.html


+ 4 - 4
plugins/org.yakindu.sct.doc.user/help/03_Tasks/tasks-toc.xml

@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='utf-8' ?>
-<toc topic="help/user/03_Tasks/tasks.html" label="tasks">
-	<topic href="help/user/03_Tasks/tasks.html" label="Tasks">
-		<topic href="help/user/03_Tasks/tasks.html#SimulatingOperationsWithCustomJavaCode" label="Simulating Operations With Custom Java Code"></topic>
-		<topic href="help/user/03_Tasks/tasks.html#GeneratingCode" label="Generating Code"></topic>
+<toc topic="help/03_Tasks/tasks.html" label="tasks">
+	<topic href="help/03_Tasks/tasks.html" label="Tasks">
+		<topic href="help/03_Tasks/tasks.html#SimulatingOperationsWithCustomJavaCode" label="Simulating Operations With Custom Java Code"></topic>
+		<topic href="help/03_Tasks/tasks.html#GeneratingCode" label="Generating Code"></topic>
 	</topic>
 </toc>

+ 74 - 73
plugins/org.yakindu.sct.doc.user/help/04_Reference/reference-toc.xml

@@ -1,91 +1,92 @@
 <?xml version='1.0' encoding='utf-8' ?>
-<toc topic="help/user/04_Reference/reference.html" label="reference">
-	<topic href="help/user/04_Reference/reference.html" label="SCT Reference">
-		<topic href="help/user/04_Reference/reference.html#Statechartelements" label="Statechart elements">
-			<topic href="help/user/04_Reference/reference.html#Regions" label="Regions"></topic>
-			<topic href="help/user/04_Reference/reference.html#States" label="States"></topic>
-			<topic href="help/user/04_Reference/reference.html#Transitions" label="Transitions"></topic>
-			<topic href="help/user/04_Reference/reference.html#Initialstateandfinalstate" label="Initial state and final state"></topic>
-			<topic href="help/user/04_Reference/reference.html#Choice" label="Choice"></topic>
-			<topic href="help/user/04_Reference/reference.html#Junction" label="Junction"></topic>
-			<topic href="help/user/04_Reference/reference.html#CompositeState" label="Composite State">
-				<topic href="help/user/04_Reference/reference.html#Orthogonalstates" label="Orthogonal states"></topic>
-				<topic href="help/user/04_Reference/reference.html#Submachinestates" label="Submachine states"></topic>
+<toc topic="help/04_Reference/reference.html" label="reference">
+	<topic href="help/04_Reference/reference.html" label="SCT Reference">
+		<topic href="help/04_Reference/reference.html#Statechartelements" label="Statechart elements">
+			<topic href="help/04_Reference/reference.html#Regions" label="Regions"></topic>
+			<topic href="help/04_Reference/reference.html#States" label="States"></topic>
+			<topic href="help/04_Reference/reference.html#Transitions" label="Transitions"></topic>
+			<topic href="help/04_Reference/reference.html#Initialstateandfinalstate" label="Initial state and final state"></topic>
+			<topic href="help/04_Reference/reference.html#Choice" label="Choice"></topic>
+			<topic href="help/04_Reference/reference.html#Junction" label="Junction"></topic>
+			<topic href="help/04_Reference/reference.html#CompositeState" label="Composite State">
+				<topic href="help/04_Reference/reference.html#Orthogonalstates" label="Orthogonal states"></topic>
+				<topic href="help/04_Reference/reference.html#Submachinestates" label="Submachine states"></topic>
 			</topic>
-			<topic href="help/user/04_Reference/reference.html#ShallowHistory" label="Shallow History"></topic>
-			<topic href="help/user/04_Reference/reference.html#DeepHistory" label="Deep History"></topic>
+			<topic href="help/04_Reference/reference.html#ShallowHistory" label="Shallow History"></topic>
+			<topic href="help/04_Reference/reference.html#DeepHistory" label="Deep History"></topic>
 		</topic>
-		<topic href="help/user/04_Reference/reference.html#Statechartdescriptionlanguage" label="Statechart description language">
-			<topic href="help/user/04_Reference/reference.html#Typesystem" label="Typesystem"></topic>
-			<topic href="help/user/04_Reference/reference.html#Expressions" label="Expressions">
-				<topic href="help/user/04_Reference/reference.html#LogicalAND" label="Logical AND"></topic>
-				<topic href="help/user/04_Reference/reference.html#LogicalOR" label="Logical OR"></topic>
-				<topic href="help/user/04_Reference/reference.html#LogicalNOT" label="Logical NOT"></topic>
-				<topic href="help/user/04_Reference/reference.html#Conditionalexpression" label="Conditional expression"></topic>
-				<topic href="help/user/04_Reference/reference.html#BitwiseXOR" label="Bitwise XOR"></topic>
-				<topic href="help/user/04_Reference/reference.html#BitwiseOR" label="Bitwise OR"></topic>
-				<topic href="help/user/04_Reference/reference.html#BitwiseAND" label="Bitwise AND"></topic>
-				<topic href="help/user/04_Reference/reference.html#LogicalRelationsandShiftOperators" label="Logical Relations and Shift Operators"></topic>
-				<topic href="help/user/04_Reference/reference.html#Binaryarithmeticoperators" label="Binary arithmetic operators"></topic>
-				<topic href="help/user/04_Reference/reference.html#Unaryarithmeticoperators" label="Unary arithmetic operators"></topic>
+		<topic href="help/04_Reference/reference.html#Statechartdescriptionlanguage" label="Statechart description language">
+			<topic href="help/04_Reference/reference.html#Typesystem" label="Typesystem"></topic>
+			<topic href="help/04_Reference/reference.html#Expressions" label="Expressions">
+				<topic href="help/04_Reference/reference.html#LogicalAND" label="Logical AND"></topic>
+				<topic href="help/04_Reference/reference.html#LogicalOR" label="Logical OR"></topic>
+				<topic href="help/04_Reference/reference.html#LogicalNOT" label="Logical NOT"></topic>
+				<topic href="help/04_Reference/reference.html#Conditionalexpression" label="Conditional expression"></topic>
+				<topic href="help/04_Reference/reference.html#BitwiseXOR" label="Bitwise XOR"></topic>
+				<topic href="help/04_Reference/reference.html#BitwiseOR" label="Bitwise OR"></topic>
+				<topic href="help/04_Reference/reference.html#BitwiseAND" label="Bitwise AND"></topic>
+				<topic href="help/04_Reference/reference.html#LogicalRelationsandShiftOperators" label="Logical Relations and Shift Operators"></topic>
+				<topic href="help/04_Reference/reference.html#Binaryarithmeticoperators" label="Binary arithmetic operators"></topic>
+				<topic href="help/04_Reference/reference.html#Unaryarithmeticoperators" label="Unary arithmetic operators"></topic>
 			</topic>
-			<topic href="help/user/04_Reference/reference.html#Statements" label="Statements"></topic>
-			<topic href="help/user/04_Reference/reference.html#Scopes" label="Scopes">
-				<topic href="help/user/04_Reference/reference.html#Namespace" label="Namespace"></topic>
-				<topic href="help/user/04_Reference/reference.html#interfacescope" label="interface scope"></topic>
-				<topic href="help/user/04_Reference/reference.html#internalscope" label="internal scope"></topic>
+			<topic href="help/04_Reference/reference.html#Statements" label="Statements"></topic>
+			<topic href="help/04_Reference/reference.html#Scopes" label="Scopes">
+				<topic href="help/04_Reference/reference.html#Namespace" label="Namespace"></topic>
+				<topic href="help/04_Reference/reference.html#interfacescope" label="interface scope"></topic>
+				<topic href="help/04_Reference/reference.html#internalscope" label="internal scope"></topic>
 			</topic>
-			<topic href="help/user/04_Reference/reference.html#Declarations" label="Declarations"></topic>
-			<topic href="help/user/04_Reference/reference.html#Events" label="Events"></topic>
-			<topic href="help/user/04_Reference/reference.html#Variables" label="Variables"></topic>
-			<topic href="help/user/04_Reference/reference.html#ReactionTriggers" label="Reaction Triggers">
-				<topic href="help/user/04_Reference/reference.html#after" label="after"></topic>
-				<topic href="help/user/04_Reference/reference.html#every" label="every"></topic>
-				<topic href="help/user/04_Reference/reference.html#always" label="always"></topic>
-				<topic href="help/user/04_Reference/reference.html#defaultelse" label="default, else"></topic>
-				<topic href="help/user/04_Reference/reference.html#entry" label="entry"></topic>
-				<topic href="help/user/04_Reference/reference.html#exit" label="exit"></topic>
-				<topic href="help/user/04_Reference/reference.html#oncycle" label="oncycle"></topic>
+			<topic href="help/04_Reference/reference.html#Declarations" label="Declarations"></topic>
+			<topic href="help/04_Reference/reference.html#Events" label="Events"></topic>
+			<topic href="help/04_Reference/reference.html#Variables" label="Variables"></topic>
+			<topic href="help/04_Reference/reference.html#ReactionTriggers" label="Reaction Triggers">
+				<topic href="help/04_Reference/reference.html#after" label="after"></topic>
+				<topic href="help/04_Reference/reference.html#every" label="every"></topic>
+				<topic href="help/04_Reference/reference.html#always" label="always"></topic>
+				<topic href="help/04_Reference/reference.html#defaultelse" label="default, else"></topic>
+				<topic href="help/04_Reference/reference.html#entry" label="entry"></topic>
+				<topic href="help/04_Reference/reference.html#exit" label="exit"></topic>
+				<topic href="help/04_Reference/reference.html#oncycle" label="oncycle"></topic>
 			</topic>
-			<topic href="help/user/04_Reference/reference.html#Operations" label="Operations"></topic>
-			<topic href="help/user/04_Reference/reference.html#BuildInFunctions" label="Build-In Functions">
-				<topic href="help/user/04_Reference/reference.html#valueofevent" label="valueof(event)"></topic>
-				<topic href="help/user/04_Reference/reference.html#activestate" label="active(state)"></topic>
+			<topic href="help/04_Reference/reference.html#Operations" label="Operations"></topic>
+			<topic href="help/04_Reference/reference.html#BuildInFunctions" label="Build-In Functions">
+				<topic href="help/04_Reference/reference.html#valueofevent" label="valueof(event)"></topic>
+				<topic href="help/04_Reference/reference.html#activestate" label="active(state)"></topic>
 			</topic>
-			<topic href="help/user/04_Reference/reference.html#LocalReactions" label="LocalReactions"></topic>
-			<topic href="help/user/04_Reference/reference.html#EntryPoints" label="EntryPoints"></topic>
-			<topic href="help/user/04_Reference/reference.html#ExitPoints" label="ExitPoints"></topic>
+			<topic href="help/04_Reference/reference.html#LocalReactions" label="LocalReactions"></topic>
+			<topic href="help/04_Reference/reference.html#EntryPoints" label="EntryPoints"></topic>
+			<topic href="help/04_Reference/reference.html#ExitPoints" label="ExitPoints"></topic>
 		</topic>
-		<topic href="help/user/04_Reference/reference.html#SGenGeneratorFeatures" label="SGen Generator Features">
-			<topic href="help/user/04_Reference/reference.html#Outlet" label="Outlet"></topic>
-			<topic href="help/user/04_Reference/reference.html#LicenseHeader" label="LicenseHeader"></topic>
-			<topic href="help/user/04_Reference/reference.html#FunctionInlining" label="FunctionInlining"></topic>
-			<topic href="help/user/04_Reference/reference.html#Debug" label="Debug"></topic>
+		<topic href="help/04_Reference/reference.html#SGenGeneratorFeatures" label="SGen Generator Features">
+			<topic href="help/04_Reference/reference.html#Outlet" label="Outlet"></topic>
+			<topic href="help/04_Reference/reference.html#LicenseHeader" label="LicenseHeader"></topic>
+			<topic href="help/04_Reference/reference.html#FunctionInlining" label="FunctionInlining"></topic>
+			<topic href="help/04_Reference/reference.html#Debug" label="Debug"></topic>
 		</topic>
-		<topic href="help/user/04_Reference/reference.html#JavaGeneratorFeatures" label="Java Generator Features">
-			<topic href="help/user/04_Reference/reference.html#Naming" label="Naming"></topic>
-			<topic href="help/user/04_Reference/reference.html#GeneralFeatures" label="GeneralFeatures"></topic>
+		<topic href="help/04_Reference/reference.html#JavaGeneratorFeatures" label="Java Generator Features">
+			<topic href="help/04_Reference/reference.html#Naming" label="Naming"></topic>
+			<topic href="help/04_Reference/reference.html#GeneralFeatures" label="GeneralFeatures"></topic>
 		</topic>
-		<topic href="help/user/04_Reference/reference.html#CGeneratorFeatures" label="C Generator Features">
-			<topic href="help/user/04_Reference/reference.html#CCodeFeature" label="CCodeFeature"></topic>
+		<topic href="help/04_Reference/reference.html#CGeneratorFeatures" label="C Generator Features">
+			<topic href="help/04_Reference/reference.html#CCodeFeature" label="CCodeFeature"></topic>
 		</topic>
-		<topic href="help/user/04_Reference/reference.html#CreateCustomCodeGenerators" label="Create Custom Code Generators">
-			<topic href="help/user/04_Reference/reference.html#WritingacustomcodegeneratorwithXtend2Java" label="Writing a custom code generator with Xtend2/Java"></topic>
-			<topic href="help/user/04_Reference/reference.html#ExecutingacustomXtend2Javacodegenerator" label="Executing a custom Xtend2/Java code generator">
-				<topic href="help/user/04_Reference/reference.html#Generator" label="Generator"></topic>
+		<topic href="help/04_Reference/reference.html#CreateCustomCodeGenerators" label="Create Custom Code Generators">
+			<topic href="help/04_Reference/reference.html#WritingacustomcodegeneratorwithXtend2Java" label="Writing a custom code generator with Xtend2/Java"></topic>
+			<topic href="help/04_Reference/reference.html#ExecutingacustomXtend2Javacodegenerator" label="Executing a custom Xtend2/Java code generator">
+				<topic href="help/04_Reference/reference.html#Generator" label="Generator"></topic>
 			</topic>
-			<topic href="help/user/04_Reference/reference.html#ExecutingacustomXpandcodegenerator" label="Executing a custom Xpand code generator">
-				<topic href="help/user/04_Reference/reference.html#Template" label="Template"></topic>
+			<topic href="help/04_Reference/reference.html#ExecutingacustomXpandcodegenerator" label="Executing a custom Xpand code generator">
+				<topic href="help/04_Reference/reference.html#Template" label="Template"></topic>
 			</topic>
 		</topic>
-		<topic href="help/user/04_Reference/reference.html#APIspecificationsofthegeneratedcode" label="API specifications of the generated code">
-			<topic href="help/user/04_Reference/reference.html#SpecificationsofJavacode" label="Specifications of Java code">
-				<topic href="help/user/04_Reference/reference.html#InterfaceIStatemachine" label="Interface IStatemachine"></topic>
-				<topic href="help/user/04_Reference/reference.html#Timedstatemachines" label="Timed statemachines"></topic>
-				<topic href="help/user/04_Reference/reference.html#DefaultimplementationofITimerService" label="Default implementation of ITimerService"></topic>
-				<topic href="help/user/04_Reference/reference.html#Runtimeservice" label="Runtime service"></topic>
-				<topic href="help/user/04_Reference/reference.html#Integrationofgeneratedcode" label="Integration of generated code"></topic>
+		<topic href="help/04_Reference/reference.html#APIspecificationsofthegeneratedcode" label="API specifications of the generated code">
+			<topic href="help/04_Reference/reference.html#SpecificationsofJavacode" label="Specifications of Java code">
+				<topic href="help/04_Reference/reference.html#InterfaceIStatemachine" label="Interface IStatemachine"></topic>
+				<topic href="help/04_Reference/reference.html#Timedstatemachines" label="Timed statemachines"></topic>
+				<topic href="help/04_Reference/reference.html#DefaultimplementationofITimerService" label="Default implementation of ITimerService"></topic>
+				<topic href="help/04_Reference/reference.html#Runtimeservice" label="Runtime service"></topic>
+				<topic href="help/04_Reference/reference.html#Integrationofgeneratedcode" label="Integration of generated code"></topic>
 			</topic>
+			<topic href="help/04_Reference/reference.html#SpecificationsofCcode" label="Specifications of C code"></topic>
 		</topic>
 	</topic>
 </toc>

+ 78 - 190
plugins/org.yakindu.sct.doc.user/help/04_Reference/reference.html

@@ -751,15 +751,12 @@ localEvent3 / NamedInterface.variable4 += 2.0; #2
 		<h2 id="APIspecificationsofthegeneratedcode">API specifications of the generated code</h2>
 		<p>In the following comments the TrafficLight example statemachine is used to describe the API specifications of the code generated by the Yakindu C and Java code generators. The following image shows the statechart. It is a model of a simple pedestrian crossing with a traffic light for pedestrians and a traffic light for the cars.</p>
 		<p>
-			<img border="0" src="images/TrafficLight.png"/> 
+			<img border="0" src="images/TrafficLight.png"/>
 		</p>
+		<h3 id="SpecificationsofJavacode">Specifications of Java code</h3>
 		<p>For Java you can checkout the project &#8218;org.yakindusct.examples.trafficlight&#8217; from the Yakindu google code repository ( 
 			<a href="http://svn.codespot.com/a/eclipselabs.org/yakindu/SCT2/trunk/examples">Google code link</a> ). The Java example contains the statechart, sgen model, graphical widgets and some glue code to connect the generated code with the widgets. The graphical widgets are based on SWT. To execute the Java example you can run the file &#8218;CrossingDemoCycleBased.java&#8217; as &#8218;Java Application&#8217; from the eclipse &#8218;Run As&#8217; context menu.
 		</p>
-		<p>For C you can checkout the project &#8218;org.yakindu.examples.c.trafficlight&#8217; from the Yakindu google code repository ( 
-			<a href="http://svn.codespot.com/a/eclipselabs.org/yakindu/SCT2/trunk/examples">Google code link</a> ). The C example contains the statechart, sgen model, graphical widgets and some glue code to connect the generated code with the widgets. The graphical widgets are based on Qt. To execute the c example you can run the file org_yakindu_sct_examples_c_trafficlight as &#8218;Local C/C++ application&#8217; from the eclipse &#8218;Run As&#8217; context menu.
-		</p>
-		<h3 id="SpecificationsofJavacode">Specifications of Java code</h3>
 		<p>You find the generated code in the &#8218;src-gen&#8217; folder of the traffic light example.</p>
 		<p>In the package &#8218;org.yakindu.sct.examples.trafficlight.cyclebased&#8217; are the most basic statemachine interfaces and classes located. These are needed by each statemachine and are independend from the concrete statemachine design.</p>
 		<h4 id="InterfaceIStatemachine">Interface IStatemachine</h4>
@@ -806,8 +803,21 @@ public interface IStatemachine {
 			<code>exit()</code> method is used to leave a statemachine statefully. If for example a history state is used in one of the top regions the last active state is stored and the statemachine is leaved via 
 			<code>exit()</code> and reentered via 
 			<code>enter()</code> it continues working with this state. The 
-			<code>runCycle()</code> method is used to trigger a run to completion step in which the statemachine evaluates arising events and computes possible state changes.
+			<code>runCycle()</code> method is used to trigger a run to completion step in which the statemachine evaluates arising events and computes possible state changes.  A run to completion step consists in a simplified view of the following steps:
 		</p>
+		<ul>
+			<li>Clear list of outgoing events.</li>
+			<li>Check whether events have occurred which lead to a state change</li>
+			<li>If a state change has to be done:
+				<ul>
+					<li>Execute exit actions of leaving state.</li>
+					<li>Save history state if necessary.</li>
+					<li>Set the new State active.</li>
+					<li>Execute entry action of the new state.</li>
+				</ul>
+			</li>
+			<li>Clear list of incoming events.</li>
+		</ul>
 		<h4 id="Timedstatemachines">Timed statemachines</h4>
 		<p>In the traffic light example timing is used (after clauses). To support this the interfaces &#8218;ITimedStatemachine&#8217;, &#8218;ITimerService&#8217; and the class &#8218;TimeEvent&#8217; are generated.</p>
 		<pre><code>package org.yakindu.sct.examples.trafficlight.cyclebased;
@@ -848,7 +858,7 @@ public interface ITimedStatemachine {
 			<code>TimeEvents</code>.
 		</p>
 		<p>Basically the correct handling of time has to be implemented by the developer because timer functions generally depend on the hardware target used. So for every hardware target a timer service class which implements the 
-			<code>ITimerService</code> Java interface has to be developed. Let&#8217;s have a look at the 
+			<code>ITimerService</code> interface has to be developed. Let&#8217;s have a look at the 
 			<code>ITimerService</code> interface:
 		</p>
 		<pre><code>package org.yakindu.sct.examples.trafficlight.cyclebased;
@@ -907,7 +917,7 @@ public interface ITimerService {
 			<code>TimeEvent</code> after the time is expired the method 
 			<code>onTimeEventRaised(TimeEvent timeEvent)</code> has to be called on the statemachine (should be a 
 			<code>ITimedStatemachine</code>). So the time event is recognized by the statemachine and will be processed by the next run cycle. You can conclude that the runtime environment has to call the statemachines &#8218;runCycle&#8217; method as often as needed to process time events raised by the timing service as fast as possible. If you have in example a time event which should be raised by the timer service after 500 ms and the runtime environment only calls the statemachines 
-			<code>runCycle</code> method with a time period of 1000 ms the event could never be processed in the correct time.
+			<code>runCycle</code> method with a time period of 1000 ms the event could not be processed in the correct time.
 		</p>
 		<p>The parameter &#8218;cycleStartTime&#8217; holds the absolute start time of the last run cycle. It can be used to reduce or remove the time offset used by the statemachines runtime operations to get a more precise timing behavior.</p>
 		<p>The method 
@@ -1054,123 +1064,19 @@ public class TimerService implements ITimerService {
 		<p>To get a clue how to integrate the generated java statemachines into your existing projects have a look at the
 			<br/>
 			<code>CrossingDemoCycleBased</code> class and it&#8217;s abstract super class 
-			<code>CrossingDemoBase</code>:
+			<code>CrossingDemoBase</code>. The code starts with the main method in 
+			<code>CrossingDemoCycleBased</code> class:
 		</p>
-		<pre><code>package org.yakindu.sct.examples.java.trafficlight;
-
-import org.yakindu.sct.examples.trafficlight.cyclebased.RuntimeService;
-import org.yakindu.sct.examples.trafficlight.cyclebased.TimerService;
-import org.yakindu.sct.examples.trafficlight.cyclebased.trafficlightwaiting.TrafficLightWaitingStatemachine;
-
-/**
- * Example to show how to integrate the generated statemachine code into
- * existing projects.
- * 
- * @author a.nyssen - initial API and implementation
- * @author m.muehlbrandt - adaptions to new statemachine code.
- * @author terfloth - refactoring
- */
-
-public class CrossingDemoCycleBased extends CrossingDemoBase {
-
-	private TrafficLightWaitingStatemachine statemachine;
-
-	public static void main(String[] args) {
-
-		new CrossingDemoCycleBased().runTrafficLight();
-	}
+		<pre><code>public static void main(String[] args) {
 
-	@Override
-	protected void setUpAndRunStatemachine() {
-
-		statemachine = new TrafficLightWaitingStatemachine();
-		statemachine.setTimerService(new TimerService());
-		statemachine.enter();
-		
-		RuntimeService.getInstance().registerStatemachine(statemachine, 100);
-	}
-
-	@Override
-	protected void tearDownStatemachine() {
-		// End TimerHandler and RuntimeService.
-		statemachine.getTimerService().cancel();
-		RuntimeService.getInstance().cancelTimer();
-	}
-
-	@Override
-	protected void readStatemachineOutput() {
-		trafficLightFigure.setRed(statemachine.getSCITrafficLight()
-				.getRed());
-		trafficLightFigure.setYellow(statemachine.getSCITrafficLight()
-				.getYellow());
-		trafficLightFigure.setGreen(statemachine.getSCITrafficLight()
-				.getGreen());
-
-		pedestrianLightFigure.setWhite(statemachine.getSCIPedestrian()
-				.getRequest());
-		pedestrianLightFigure.setRed(statemachine.getSCIPedestrian()
-				.getRed());
-		pedestrianLightFigure.setGreen(statemachine.getSCIPedestrian()
-				.getGreen());
-	}
-
-	@Override
-	protected void pedestrianRequestButtonClicked() {
-		statemachine.raisePedestrianRequest(); // raise event in statemachine
-	}
-
-	@Override
-	protected void onOffButtonClicked() {
-		statemachine.raiseOnOff(); // raise event in statemachine
-	}
+	new CrossingDemoCycleBased().runTrafficLight();
 }
 
 </code></pre>
-		<p></p>
-		<pre><code>package org.yakindu.sct.examples.java.trafficlight;
-
-import org.eclipse.draw2d.FigureCanvas;
-import org.eclipse.draw2d.LightweightSystem;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This class cares about setting up the UI of the pesestrian crossing and
- * delegates the state machine handling to the concrete subcasses.
- * 
- * @author terfloth
- */
-public abstract class CrossingDemoBase {
-
-	protected Shell shell;
-	protected Display display;
-	protected CrossingFigure crossing;
-	protected TrafficLightFigure trafficLightFigure;
-	protected PedestrianLightFigure pedestrianLightFigure;
-
-	public CrossingDemoBase() {
-		super();
-	}
-
-	protected abstract void setUpAndRunStatemachine();
-
-	protected abstract void tearDownStatemachine();
-
-	protected abstract void readStatemachineOutput();
-
-	protected abstract void pedestrianRequestButtonClicked();
-
-	protected abstract void onOffButtonClicked();
-
-	public void runTrafficLight() {
+		<p>A new instance of the class is created and the method 
+			<code>runTrafficLight()</code> is directly called. This method consist in the super class:
+		</p>
+		<pre><code>public void runTrafficLight() {
 
 		setUpAndRunStatemachine();
 		createUIContent();
@@ -1188,83 +1094,65 @@ public abstract class CrossingDemoBase {
 		}
 
 		tearDownStatemachine();
-	}
-
-	protected void createUIContent() {
-		display = Display.getDefault();
-		shell = new Shell(display);
-		shell.setSize(400, 400);
-		shell.setText("Traffic Light Demo");
-		GridLayout shellLayout = new GridLayout();
-		shellLayout.numColumns = 1;
-		shell.setLayout(shellLayout);
-
-		LightweightSystem lws = createLightweightsystem(shell);
-		createButtonComposite(shell);
-
-		crossing = new CrossingFigure();
-		lws.setContents(crossing);
-		trafficLightFigure = new TrafficLightFigure();
-		crossing.add(trafficLightFigure);
-		crossing.getLayoutManager().setConstraint(trafficLightFigure,
-				new Rectangle(275, 75, 35, 90));
-
-		pedestrianLightFigure = new PedestrianLightFigure();
-		crossing.add(pedestrianLightFigure);
-		crossing.getLayoutManager().setConstraint(pedestrianLightFigure,
-				new Rectangle(50, 10, 70, 20));
-	}
-
-	protected LightweightSystem createLightweightsystem(Shell shell) {
-
-		FigureCanvas canvas = new FigureCanvas(shell);
-		GridData canvasGridData = new GridData();
-		canvasGridData.horizontalAlignment = GridData.FILL;
-		canvasGridData.verticalAlignment = GridData.FILL;
-		canvasGridData.grabExcessVerticalSpace = true;
-		canvasGridData.grabExcessHorizontalSpace = true;
-		canvas.setLayoutData(canvasGridData);
-		LightweightSystem lws = new LightweightSystem(canvas);
-		return lws;
-	}
-
-	protected void createButtonComposite(Shell shell) {
-		// create a composite to hold the buttons
-		Composite buttonComposite = new Composite(shell, SWT.NO_SCROLL);
-		GridData buttonCompositeGridData = new GridData();
-		buttonCompositeGridData.horizontalAlignment = GridData.FILL;
-		buttonCompositeGridData.grabExcessHorizontalSpace = true;
-		buttonComposite.setLayoutData(buttonCompositeGridData);
-		FillLayout buttonCompositeLayout = new FillLayout();
-		buttonCompositeLayout.type = SWT.HORIZONTAL;
-		buttonComposite.setLayout(new FillLayout());
-
-		// create a button and event handlers
-
-		Button pedestrianRequest = new Button(buttonComposite, SWT.PUSH);
-		pedestrianRequest.setText("pedestrian request");
-		pedestrianRequest.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(final org.eclipse.swt.widgets.Event event) {
-				pedestrianRequestButtonClicked();
-			}
+}
 
-		});
+</code></pre>
+		<p>This method setups the statemachine and creates the UI content. In a while loop the content of the statemachine is read and the ui is repainted. If the ui shell is closed the loop is left and the statemachine is teared down. The really interresting methods are 
+			<code>setUpAndRunStatemachine()</code>, 
+			<code>readStatemachinOutput</code> and 
+			<code>tearDownStatemachine()</code>:
+		</p>
+		<pre><code>protected void setUpAndRunStatemachine() {
 
-		Button onOff = new Button(buttonComposite, SWT.PUSH);
-		onOff.setText("on / off");
-		onOff.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(final org.eclipse.swt.widgets.Event event) {
-				onOffButtonClicked();
-			}
+	statemachine = new TrafficLightWaitingStatemachine();
+	statemachine.setTimerService(new TimerService());
+	statemachine.init();
+	statemachine.enter();
+	
+	RuntimeService.getInstance().registerStatemachine(statemachine, 100);
+}
 
-		});
-	}
+</code></pre>
+		<p>First a new instance of the generated statemachine is created. Because the traffic light statechart uses timing clauses the default implementation of the 
+			<code>TimerService</code> is set. In the next steps the statemachine is initialized and entered. After the enter method ist executed the machine stays in a defined state. Finally the statemachine is passed to the runtime service. This service executes the 
+			<code>runCycle()</code> method of the statemachine every 100 ms. So the statemachine executes a run to completion step every 100 ms.
+		</p>
+		<pre><code>protected void readStatemachineOutput() {
+	trafficLightFigure.setRed(statemachine.getSCITrafficLight()
+			.getRed());
+	trafficLightFigure.setYellow(statemachine.getSCITrafficLight()
+			.getYellow());
+	trafficLightFigure.setGreen(statemachine.getSCITrafficLight()
+			.getGreen());
+		pedestrianLightFigure.setWhite(statemachine.getSCIPedestrian()
+			.getRequest());
+	pedestrianLightFigure.setRed(statemachine.getSCIPedestrian()
+			.getRed());
+	pedestrianLightFigure.setGreen(statemachine.getSCIPedestrian()
+			.getGreen());
+}
 
+</code></pre>
+		<p>The generated code contains getters and setters for each variable and event. So it&#8217;s easy to read values from and write values to a statemachine or raise events and ask the statemachine if outgoing events were raised during the last run to completion step. Within 
+			<code>readStatemachineOutput()</code> method these methods are used to read the light values from the statemachine and set them to the ui elements. Within the methods 
+			<code>pedestrianRequestButtonClicked()</code> and 
+			<code>onOffButtonClicked()</code> some events are raised.
+		</p>
+		<p>Hint:
+			<br/>If outgoing events are raised within the statemachine they remain active until the next run to completion step is started.
+		</p>
+		<pre><code>@Override
+protected void tearDownStatemachine() {
+	// End TimerHandler and RuntimeService.
+	statemachine.getTimerService().cancel();
+	RuntimeService.getInstance().cancelTimer();
 }
 
 </code></pre>
-		<p>
-			<br/>h3. Specifications of C code
+		<p>If the UI thread has been terminated by the user, the state machine will be shut down. It is necessary to end the timer service. Finally the runtime service is cancelled.</p>
+		<h3 id="SpecificationsofCcode">Specifications of C code</h3>
+		<p>For C you can checkout the project &#8218;org.yakindu.examples.c.trafficlight&#8217; from the Yakindu google code repository ( 
+			<a href="http://svn.codespot.com/a/eclipselabs.org/yakindu/SCT2/trunk/examples">Google code link</a> ). The C example contains the statechart, sgen model, graphical widgets and some glue code to connect the generated code with the widgets. The graphical widgets are based on Qt. To execute the c example you can run the file org_yakindu_sct_examples_c_trafficlight as &#8218;Local C/C++ application&#8217; from the eclipse &#8218;Run As&#8217; context menu.
 		</p>
 	</body>
 </html>

Datei-Diff unterdrückt, da er zu groß ist
+ 1059 - 1005
plugins/org.yakindu.sct.doc.user/help/04_Reference/reference.textile