Sfoglia il codice sorgente

Share project "org.yakindu.sct.doc.developer" into "https://svn.codespot.com/a/eclipselabs.org/yakindu"

Andreas Mülder 13 anni fa
parent
commit
4859892ab5
22 ha cambiato i file con 407 aggiunte e 0 eliminazioni
  1. 22 0
      plugins/org.yakindu.sct.doc.developer/.project
  2. 6 0
      plugins/org.yakindu.sct.doc.developer/META-INF/MANIFEST.MF
  3. 1 0
      plugins/org.yakindu.sct.doc.developer/build.properties
  4. BIN
      plugins/org.yakindu.sct.doc.developer/help/01_Overview/images/overview_yakindu_modules_tech.jpg
  5. 6 0
      plugins/org.yakindu.sct.doc.developer/help/01_Overview/overview-toc.xml
  6. 40 0
      plugins/org.yakindu.sct.doc.developer/help/01_Overview/overview.html
  7. 18 0
      plugins/org.yakindu.sct.doc.developer/help/01_Overview/overview.textile
  8. 7 0
      plugins/org.yakindu.sct.doc.developer/help/02_Getting_Started/getting_started-toc.xml
  9. 43 0
      plugins/org.yakindu.sct.doc.developer/help/02_Getting_Started/getting_started.html
  10. 19 0
      plugins/org.yakindu.sct.doc.developer/help/02_Getting_Started/getting_started.textile
  11. BIN
      plugins/org.yakindu.sct.doc.developer/help/02_Getting_Started/images/new_java_xtend_project.jpg
  12. BIN
      plugins/org.yakindu.sct.doc.developer/help/02_Getting_Started/images/new_xpand_project_simple.jpg
  13. 9 0
      plugins/org.yakindu.sct.doc.developer/help/03_Concepts/concepts-toc.xml
  14. 112 0
      plugins/org.yakindu.sct.doc.developer/help/03_Concepts/concepts.html
  15. 92 0
      plugins/org.yakindu.sct.doc.developer/help/03_Concepts/concepts.textile
  16. BIN
      plugins/org.yakindu.sct.doc.developer/help/03_Concepts/images/TrafficLight.png
  17. 4 0
      plugins/org.yakindu.sct.doc.developer/help/04_Tasks/tasks-toc.xml
  18. 11 0
      plugins/org.yakindu.sct.doc.developer/help/04_Tasks/tasks.html
  19. 1 0
      plugins/org.yakindu.sct.doc.developer/help/04_Tasks/tasks.textile
  20. 4 0
      plugins/org.yakindu.sct.doc.developer/help/05_Reference/reference-toc.xml
  21. 11 0
      plugins/org.yakindu.sct.doc.developer/help/05_Reference/reference.html
  22. 1 0
      plugins/org.yakindu.sct.doc.developer/help/05_Reference/reference.textile

+ 22 - 0
plugins/org.yakindu.sct.doc.developer/.project

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.sct.doc.developer</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>

+ 6 - 0
plugins/org.yakindu.sct.doc.developer/META-INF/MANIFEST.MF

@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Developer Guide
+Bundle-SymbolicName: org.yakindu.sct.doc.developer
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: yakindu.org

+ 1 - 0
plugins/org.yakindu.sct.doc.developer/build.properties

@@ -0,0 +1 @@
+bin.includes = META-INF/

BIN
plugins/org.yakindu.sct.doc.developer/help/01_Overview/images/overview_yakindu_modules_tech.jpg


+ 6 - 0
plugins/org.yakindu.sct.doc.developer/help/01_Overview/overview-toc.xml

@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc topic="help/developer/01_Overview/overview.html" label="overview">
+	<topic href="help/developer/01_Overview/overview.html" label="Overview">
+		<topic href="help/developer/01_Overview/overview.html#Howdoesitwork" label="How does it work?"></topic>
+	</topic>
+</toc>

+ 40 - 0
plugins/org.yakindu.sct.doc.developer/help/01_Overview/overview.html

@@ -0,0 +1,40 @@
+<?xml version='1.0' encoding='utf-8' ?><!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>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+		<title>overview</title>
+		<link type="text/css" rel="stylesheet" href="../style.css"/>
+	</head>
+	<body>
+		<h1 id="Overview">Overview</h1>
+		<h2 id="Howdoesitwork">How does it work?</h2>
+		<p>The YAKINDU SCT 2 are integrated in Eclipse and use the textual modeling toolkit Xtext and the graphical modeling toolkit GMF. Behind the scenes of the statechart tools there are some meta models: </p>
+		<ul>
+			<li>
+				<strong>SText</strong> the meta model for the state machines and their behavior
+			</li>
+			<li>
+				<strong>SGraph</strong> the meta model for the graphical representation of the state machine models
+			</li>
+			<li>
+				<strong>SExec</strong> an intermediate model for execution
+			</li>
+			<li>
+				<strong>SGen</strong> an intermediate model used for generating
+			</li>
+		</ul>
+		<p>The following graph shows these meta models, which are all defined as languages and their position in the SCT 2 work flow:</p>
+		<p>
+			<img border="0" src="images/overview_yakindu_modules_tech.jpg"/>
+		</p>
+		<p>The statechart editor uses 
+			<strong>SText</strong> and 
+			<strong>SGraph</strong>. The actual model of the state machine is defined in 
+			<strong>SText</strong>. 
+			<strong>SGraph</strong> only describes the graphical representation in the editor. 
+			<strong>SExec</strong> is an intermediate execution model. It is used behind the scenes as a foundation for the code generators and the simulation engine. This guarantees that the simulation behaves in the same way as the generated statechart implementations. It captures the execution behavior and may also serve as the basis of custom code generators. 
+			<strong>SGen</strong> is a generator model. All generators can be customized with such a generator model. In fact it is a textual model file where generator features, like i.e. the outlet path, can be specified.
+		</p>
+		<p>The YAKINDU SCT 2 can be installed in a full blown Eclipse-IDE specifically tailored for your language. It already provides great default functionality for all aspects and allows to configure  the most common things very easily. </p>
+	</body>
+</html>

File diff suppressed because it is too large
+ 18 - 0
plugins/org.yakindu.sct.doc.developer/help/01_Overview/overview.textile


+ 7 - 0
plugins/org.yakindu.sct.doc.developer/help/02_Getting_Started/getting_started-toc.xml

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc topic="help/developer/02_Getting_Started/getting_started.html" label="getting_started">
+	<topic href="help/developer/02_Getting_Started/getting_started.html" label="Developer Getting started">
+		<topic href="help/developer/02_Getting_Started/getting_started.html#YakinduXpandGeneratorProject" label="Yakindu Xpand Generator Project"></topic>
+		<topic href="help/developer/02_Getting_Started/getting_started.html#YakinduXtend2JavaGeneratorProject" label="Yakindu Xtend2/Java Generator Project"></topic>
+	</topic>
+</toc>

+ 43 - 0
plugins/org.yakindu.sct.doc.developer/help/02_Getting_Started/getting_started.html

@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='utf-8' ?><!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>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+		<title>getting_started</title>
+		<link type="text/css" rel="stylesheet" href="../style.css"/>
+	</head>
+	<body>
+		<h1 id="DeveloperGettingstarted">Developer Getting started</h1>
+		<h2 id="YakinduXpandGeneratorProject">Yakindu Xpand Generator Project</h2>
+		<p>In the context of model driven software development generators play an important role. The generator transforms the model to either another model or text like code. Yakindu generators support multiple transform languages. One is Xpand. By clicking 
+			<strong>File</strong> &gt; 
+			<strong>New</strong> &gt; 
+			<strong>Other...</strong> &gt; 
+			<strong>YAKINDU Xpand Generator Project</strong> you create a project optimized for writing a generator in Xpand. For more details regarding Xpand see: 
+			<a href="PLUGIN_ROOT/org.eclipse.xpand.doc/help/index.html">Xpand documentation</a>.
+		</p>
+		<p>
+			<img border="0" src="images/new_xpand_project_simple.jpg"/>
+		</p>
+		<p>All you need to do is to give it a speaking name and click 
+			<strong>Finish</strong>. The setting 
+			<strong>Configure for Plugin Export</strong> is an option for plugin developers.
+		</p>
+		<p>The newly created project has a package with an Xpand starting point: the 
+			<em>Main.xpt</em>. This file the includes the needed metamodels. It has the entrance Xpand statement that iterates all states in the model and prints the names in a text file.
+		</p>
+		<h2 id="YakinduXtend2JavaGeneratorProject">Yakindu Xtend2/Java Generator Project</h2>
+		<p>The generator that transforms the state machine model into code or documentation can be written in Xtend2 and Java. Find a detailed description on Xtend2 in the 
+			<a href="PLUGIN_ROOT/org.eclipse.xtext.doc/contents/01-Xtend_Introduction.html">Xtend2 documentation</a>. Yakindu comes with a predefined project setting for such projects. To create such a project click 
+			<strong>File</strong> &gt; 
+			<strong>New</strong> &gt; 
+			<strong>Other...</strong> &gt; 
+			<strong>YAKINDU Xtend2/Java Generator Project</strong>. 
+		</p>
+		<p>
+			<img border="0" src="images/new_java_xtend_project.jpg"/>
+		</p>
+		<p>Give the project a speaking full qualified name and name also the generator java class with a full qualified name. If you also want to use Xtend select 
+			<strong>Use Xtend</strong>. The result is a new project with an initial Xtend file and java class.
+		</p>
+	</body>
+</html>

+ 19 - 0
plugins/org.yakindu.sct.doc.developer/help/02_Getting_Started/getting_started.textile

@@ -0,0 +1,19 @@
+h1. Developer Getting started
+
+h2. Yakindu Xpand Generator Project
+
+In the context of model driven software development generators play an important role. The generator transforms the model to either another model or text like code. Yakindu generators support multiple transform languages. One is Xpand. By clicking *File* > *New* > *Other...* > *YAKINDU Xpand Generator Project* you create a project optimized for writing a generator in Xpand. For more details regarding Xpand see: "Xpand documentation":PLUGIN_ROOT/org.eclipse.xpand.doc/help/index.html.
+
+!images/new_xpand_project_simple.jpg!
+
+All you need to do is to give it a speaking name and click *Finish*. The setting *Configure for Plugin Export* is an option for plugin developers.
+
+The newly created project has a package with an Xpand starting point: the _Main.xpt_. This file the includes the needed metamodels. It has the entrance Xpand statement that iterates all states in the model and prints the names in a text file.
+
+h2. Yakindu Xtend2/Java Generator Project
+
+The generator that transforms the state machine model into code or documentation can be written in Xtend2 and Java. Find a detailed description on Xtend2 in the "Xtend2 documentation":PLUGIN_ROOT/org.eclipse.xtext.doc/contents/01-Xtend_Introduction.html. Yakindu comes with a predefined project setting for such projects. To create such a project click *File* > *New* > *Other...* > *YAKINDU Xtend2/Java Generator Project*. 
+
+!images/new_java_xtend_project.jpg!
+
+Give the project a speaking full qualified name and name also the generator java class with a full qualified name. If you also want to use Xtend select *Use Xtend*. The result is a new project with an initial Xtend file and java class.

BIN
plugins/org.yakindu.sct.doc.developer/help/02_Getting_Started/images/new_java_xtend_project.jpg


BIN
plugins/org.yakindu.sct.doc.developer/help/02_Getting_Started/images/new_xpand_project_simple.jpg


+ 9 - 0
plugins/org.yakindu.sct.doc.developer/help/03_Concepts/concepts-toc.xml

@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc topic="help/developer/03_Concepts/concepts.html" label="concepts">
+	<topic href="help/developer/03_Concepts/concepts.html" label="Developer Concepts">
+		<topic href="help/developer/03_Concepts/concepts.html#APIspecificationsofthegeneratedcode" label="API specifications of the generated code">
+			<topic href="help/developer/03_Concepts/concepts.html#SpecificationsofJavacode" label="Specifications of Java code"></topic>
+			<topic href="help/developer/03_Concepts/concepts.html#SpecificationsofCcode" label="Specifications of C code"></topic>
+		</topic>
+	</topic>
+</toc>

+ 112 - 0
plugins/org.yakindu.sct.doc.developer/help/03_Concepts/concepts.html

@@ -0,0 +1,112 @@
+<?xml version='1.0' encoding='utf-8' ?><!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>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+		<title>concepts</title>
+		<link type="text/css" rel="stylesheet" href="../style.css"/>
+	</head>
+	<body>
+		<p><link href="../../../css/bootstrap.css" rel="stylesheet" />
+			<br/><link href="../../../css/custom.css" rel="stylesheet" />
+		</p>
+		<h1 id="DeveloperConcepts">Developer Concepts</h1>
+		<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"/> 
+		</p>
+		<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>
+		<p>The interface 
+			<code>IStatemachine</code> is implemented by each generated statemachine:
+		</p>
+		<pre><code>package org.yakindu.sct.examples.trafficlight.cyclebased;
+
+/**
+ * Basic interface for statemachines.
+ * 
+ * 
+ */
+public interface IStatemachine {
+
+	/**
+	* Initializes the statemachine. Use to init internal variables etc.
+	*/
+	public void init();
+
+	/**
+	* Enters the statemachine. Sets the statemachine in a defined state.
+	*/
+	public void enter();
+
+	/**
+	* Exits the statemachine. Leaves the statemachine with a defined state.
+	*/
+	public void exit();
+
+	/**
+	* Start a run-to-completion cycle.
+	*/
+	public void runCycle();
+}
+</code></pre>
+		<p>It contains the four methods 
+			<code>init()</code>, 
+			<code>enter()</code>, 
+			<code>exit()</code> and 
+			<code>runCycle()</code>. The 
+			<code>init()</code> method is used to initialize the internal objects of the statemachine after instantiation. Variables are initialized to a default value. If you have initialized variables in the statechart definition these initializations are done in the init method too. The 
+			<code>enter()</code> method should be called if the statemachine is entered. It sets the statemachine into a defined state. The 
+			<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.
+		</p>
+		<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;
+
+/**
+* Interface for state machines which use timed event triggers.
+*/
+public interface ITimedStatemachine {
+
+	/**
+	* Set the {@link ITimerService} for the state machine. It must be set
+	* externally on a timed state machine before a run cycle can be correct
+	* executed.
+	* 
+	* @param timerService
+	*/
+	public void setTimerService(ITimerService timerService);
+
+	/**
+	* Returns the currently used timer service.
+	* 
+	* @return {@link ITimerService}
+	*/
+	public ITimerService getTimerService();
+
+	/**
+	* Callback method if a {@link TimeEvent} occurred.
+	* 
+	* @param timeEvent
+	*/
+	public void onTimeEventRaised(TimeEvent timeEvent);
+}
+</code></pre>
+		<p>
+			<code>ITimedStatemachine</code> extends the generated statemachine to set a 
+			<code>ITimerService</code> and provides a callback method 
+			<code>onTimeEventRaised(TimeEvent timeEvent)</code> to raise 
+			<code>TimeEvents</code>.
+		</p>
+		<h3 id="SpecificationsofCcode">Specifications of C code</h3>
+	</body>
+</html>

File diff suppressed because it is too large
+ 92 - 0
plugins/org.yakindu.sct.doc.developer/help/03_Concepts/concepts.textile


BIN
plugins/org.yakindu.sct.doc.developer/help/03_Concepts/images/TrafficLight.png


+ 4 - 0
plugins/org.yakindu.sct.doc.developer/help/04_Tasks/tasks-toc.xml

@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc topic="help/developer/04_Tasks/tasks.html" label="tasks">
+	<topic href="help/developer/04_Tasks/tasks.html" label="Developer Tasks"></topic>
+</toc>

+ 11 - 0
plugins/org.yakindu.sct.doc.developer/help/04_Tasks/tasks.html

@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='utf-8' ?><!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>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+		<title>tasks</title>
+		<link type="text/css" rel="stylesheet" href="../style.css"/>
+	</head>
+	<body>
+		<h1 id="DeveloperTasks">Developer Tasks</h1>
+	</body>
+</html>

+ 1 - 0
plugins/org.yakindu.sct.doc.developer/help/04_Tasks/tasks.textile

@@ -0,0 +1 @@
+h1. Developer Tasks

+ 4 - 0
plugins/org.yakindu.sct.doc.developer/help/05_Reference/reference-toc.xml

@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc topic="help/developer/05_Reference/reference.html" label="reference">
+	<topic href="help/developer/05_Reference/reference.html" label="Reference"></topic>
+</toc>

+ 11 - 0
plugins/org.yakindu.sct.doc.developer/help/05_Reference/reference.html

@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='utf-8' ?><!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>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+		<title>reference</title>
+		<link type="text/css" rel="stylesheet" href="../style.css"/>
+	</head>
+	<body>
+		<h1 id="Reference">Reference</h1>
+	</body>
+</html>

+ 1 - 0
plugins/org.yakindu.sct.doc.developer/help/05_Reference/reference.textile

@@ -0,0 +1 @@
+h1. Reference