소스 검색

Five-minutes tutorial (#689)

#689: Added five-minutes tutorial and tweaked image styling.
Rainer Klute 9 년 전
부모
커밋
2ff0e6a908

+ 27 - 7
plugins/org.yakindu.sct.doc.user/css/custom.css

@@ -125,7 +125,8 @@ body {
 }
 
 img {
-    max-width: 60%;
+    max-width: 61.8%;
+    min-width: 38.2%;
     height: auto;
     text-align: center;
     display: block;
@@ -133,23 +134,42 @@ img {
     margin-right: auto;
 }
 
-.standard-image {
-    width:80.0%;
+img.standard-image {
     height:auto;
     box-shadow: 10px 10px 20px #888888;
+    margin-bottom: 20px;
 }
 
-.shadowless-standard-image {
-    width:80.0%;
-    height:auto;
+img.tiny {
+    width:14.6%;
+    min-width:14.6%;
+}
+
+img.small {
+    width:38.2%;
+}
+
+img.large {
+    width:61.8%;
 }
 
-.inlinemediaobject {
+img.full {
+    width:100%;
+    max-width:100%;
+}
+
+img.shadowless {
+    box-shadow: none;
+    margin-bottom: 0px;
+}
+
+img.inlinemediaobject {
     display: inline;
     height: 1.1em;
 }
 
 
+
 /* Tables */
 
 .informaltable td {

+ 6 - 6
plugins/org.yakindu.sct.doc.user/src/Part1-Installation-Guide/00_installation.textile

@@ -120,7 +120,7 @@ Unpacking will provide you with the _YAKINDU SCT_ application bundle.
 
 Move the unpacked application bundle to your _Applications_ folder. Alternatively, you can also move it somewhere else as you see fit. The screenshot below shows the _YAKINDU SCT_ application bundle having been moved to _Applications_.
 
-!(shadowless-standard-image)images/macosx_install_010_applications.png(The YAKINDU Statecharts Tools application in the "Applications" directory)!
+!(standard-image shadowless)images/macosx_install_010_applications.png(The YAKINDU Statecharts Tools application in the "Applications" directory)!
 
 p=. The YAKINDU Statecharts Tools application in the "Applications" directory
 
@@ -134,7 +134,7 @@ To do so, please double-click on the _YAKINDU_ symbol shown in the sample screen
 
 Upon the first start, Mac OS X will verify the application and show you the following security warning, indicating that you did not download the application from Apple's App Store, but from a potentially unsecure source instead:
 
-!(shadowless-standard-image)images/macosx_install_020_security_warning.png(Mac OS X warning)!
+!(standard-image shadowless)images/macosx_install_020_security_warning.png(Mac OS X warning)!
 
 p=. Mac OS X warning
 
@@ -142,7 +142,7 @@ Click _Open_ to continue starting the application. Subsequently starting YAKINDU
 
 While YAKINDU Statechart Tools is starting up, it is showing a splash screen:
 
-!(shadowless-standard-image)images/macosx_install_050_eclipse_splash.png(YAKINDU Statechart Tools starting up and showing a splash screen)!
+!(standard-image shadowless)images/macosx_install_050_eclipse_splash.png(YAKINDU Statechart Tools starting up and showing a splash screen)!
 
 p=. YAKINDU Statechart Tools starting up and showing a splash screen
 
@@ -150,7 +150,7 @@ The software needs a _workspace_ directory where it stores its so-called project
 
 In the example below, we chose the _/Users/joedoe/workspace_ directory as our workspace. We also checked the _"Use this as the default and do not ask again"_ option. This is sensible, because on subsequent startups, YAKINDU Statechart Tools won't ask for a workspace directory again. Instead it will always use the one we chose once and forever. (You can still change the workspace later via _File → Switch Workspace_ in the main menu.)
 
-!(shadowless-standard-image)images/macosx_install_060_eclipse_workspace_dialog.png(Selecting a workspace)!
+!(standard-image shadowless)images/macosx_install_060_eclipse_workspace_dialog.png(Selecting a workspace)!
 
 p=. Selecting a workspace
 
@@ -158,13 +158,13 @@ Click on the _OK_ button to proceed.
 
 On the first start, YAKINDU Statechart Tools presents a _Welcome_ window:
 
-!(shadowless-standard-image)images/macosx_install_070_eclipse_welcome.png(YAKINDU Statechart Tools presenting the "Welcome" window)!
+!(standard-image shadowless)images/macosx_install_070_eclipse_welcome.png(YAKINDU Statechart Tools presenting the "Welcome" window)!
 
 p=. YAKINDU Statechart Tools presenting the "Welcome" window
 
 You can browse the material shown here, if you want. When you are done, please close the _Welcome_ tab or click on _Workbench_ at the upper right. Both actions are leading to the workbench:
 
-!(shadowless-standard-image)images/macosx_install_080_eclipse_workbench.png(The YAKINDU Statechart Tools workbench)!
+!(standard-image shadowless)images/macosx_install_080_eclipse_workbench.png(The YAKINDU Statechart Tools workbench)!
 
 p=. The YAKINDU Statechart Tools workbench
 

+ 47 - 3
plugins/org.yakindu.sct.doc.user/src/Part2-User-Guide/20_tutorial.textile

@@ -1,4 +1,48 @@
-h1(#comprehensive-tutorial). Comprehensive tutorial
+h1(#oss_five-minutes-tutorial). Five-minutes tutorial
+
+The five-minutes tutorial gives you a brief introduction into YAKINDU Statechart Tools by a simple example. It models a light switch, which has the states _on_ and _off_. Operating the switch repeatedly turns the light on, off, back on again, and so forth. You can simulate this behavior in a dynamic statechart model. Here's how this looks like:
+
+!(standard-image full)images/light_switch_330_statechart_simulator_state_on.png(Interactive light switch statechart simulation)!
+
+p=. Interactive light switch statechart simulation
+
+In the simulation screenshot above, the light switch is currently in the _on_ state. To toggle the light switch, the user clicks on _operate_ on the right-hand side of the window.
+
+h2(#oss_importing-light-switch-example). Importing light switch example
+
+Now try this for yourself. We are assuming that you have already installed and started YAKINDU Statechart Tools. If you don't, please see the "Installation Guide":../Part1-Installation-Guide/00_installation.html for details.
+
+# If the "Welcome" page is still open, close it. <p>!(standard-image small)images/5min_010_close_welcome.png(Closing the "Welcome" page)!</p>
+# In the main menu, select _File → New → Example…_.
+# In the dialog, select _YAKINDU SCT Examples → Light Switch Example_, then click _Next >_.
+# In the next dialog, click _Finish_. The sample project named _light_switch_ is created.
+# In the project explorer on the left-hand side of the window, open the _light_switch_ project by clicking on the small triangle left from the project name ("light_switch"). <p>!(standard-image small)images/5min_020_expand_project.png(Expand project)!</p>
+# The light switch statechart is defined in _LightSwitch.sct_. Double click on this file to open the model.
+
+h2(#oss_running-the-light-switch-simulation). Simulating the light switch
+
+# Right-click on _LightSwitch.sct_ and select _Run As → Statechart Simulation_ in the context menu.
+# The statechart simulation starts and shows the light switch model in its _off_ state. The rectangle named *Off* is highlighted in red, meaning it is the active state. <p>!(standard-image)images/light_switch_320_statechart_simulator_state_events.png(Light switch simulation in "off" state)!</p>
+# At the right-bottom side of the window, the simulation view is located. In this view, you can change variable values and raise events during a simulation run. Click on the small triangle left from _internal_
+ to unfold the _operate_ link. This link represents the _operate_ event to switch the light on or off.
+# Click on the _operate_ link. The active state changes accordingly from *Off* to *On*. <p>!(standard-image)images/light_switch_330_statechart_simulator_state_on.png(Light switch simulation in "on" state)!</p>
+# Click on _operate_ again to switch off the light.
+
+h2(standard #oss_generating-statechart-code). Generating statechart code
+
+You have developed and tested your statechart model, and now you need it as a C, C++, or Java implementation? YAKINDU Statechart Tools can create it for you.
+
+As an example, we will take the light switch statechart and generate Java source code from it. Please proceed as follows:
+
+# In the project explorer, right-click on _LightSwitch.sct_ and select _New → Code Generator Model_ in the context menu. <p>!(standard-image)images/5min_110_new_code_generator_model.png(Creating a new code generator model)!</p>
+# In the dialog, replace @default.sgen@ by @light_switch.sgen@, then click _Next >_.
+# In the next dialog, check the checkbox left from _LightSwitch.sct_, then click _Finish_.
+# Java classes implementing the statechart model are generated. You can find the generated source code in the folders _src_ and _src-gen_ within the _light_switch_ project. <p>!(standard-image)images/5min_140_generated_java_source_code.png(Generated Java source code)!</p>
+
+That's it. If you want to know more, take the time and work through the "Comprehensive Tutorial":#oss_comprehensive-tutorial.
+
+
+h1(#oss_comprehensive-tutorial). Comprehensive tutorial
 
 This tutorial introduces YAKINDU Statechart Tools (SCT) which provides an integrated modeling environment for the specification and development of reactive, event-driven systems based on the concept of state machines or statecharts. It is an easy-to-use tool featuring sophisticated graphical statechart editing, validation and simulation of statecharts as well as code generation for C, C&#43;&#43;, or Java.
 
@@ -51,9 +95,9 @@ Select _General → Project_ and click _Next &gt;_.
 
 The wizard shows its next page:
 
-!(standard-image)images/light_switch_040_wizard_new_project.png("Specifying project name and location")!
+!(standard-image)images/light_switch_040_wizard_new_project.png(Specifying project name and location)!
 
-p=. "Specifying project name and location"
+p=. Specifying project name and location
 
 Specify a meaningful _Project name_, e. g. *LightSwitch*, and optionally select a _Location_ to create the project in.
 

BIN
plugins/org.yakindu.sct.doc.user/src/Part2-User-Guide/images/5min_010_close_welcome.png


BIN
plugins/org.yakindu.sct.doc.user/src/Part2-User-Guide/images/5min_020_expand_project.png


BIN
plugins/org.yakindu.sct.doc.user/src/Part2-User-Guide/images/5min_110_new_code_generator_model.png


BIN
plugins/org.yakindu.sct.doc.user/src/Part2-User-Guide/images/5min_120_naming_the_code_generator_model.png


BIN
plugins/org.yakindu.sct.doc.user/src/Part2-User-Guide/images/5min_130_selecting_the_statechart_model.png


BIN
plugins/org.yakindu.sct.doc.user/src/Part2-User-Guide/images/5min_140_generated_java_source_code.png