h1(#Test2). Yakindu SCT Testcase 08 - Genmodel

|_. Nr |_. Testname |_. Test Instructions |_. Postconditions |_. Status|
| 8.1 | Create Generator Model for Java | Select TestProject in project explorer.<p>Select *File→New→Other* from the menu.</p><p>Select *YAKINDU SCT→Code* Generator Model.</p><p>Click *Next*.</p><p>As file name, enter StaircaseJava.sgen.</p><p>Click *Next*.</p><p>Select YAKINDU SCT Java Code Generator and check Staircase.sct.</p><p>Click on *Finish button*. | File StaircaseJava.sgen has been created with initial settings.</p><p>Folders src and src-gen have been created and populated by builder. </p>| %{color:red}open% |
| 8.1.1 | Change Output Folder | Open file StaircaseJava.sgen.<p>Change targetFolder to from src-gen to src-gen-java.</p><p>Save the file by e.g. pressing *[Ctrl+S]*.</p> | Folder src-gen-java has been created and populated with with generated code. | %{color:red}open% |
| 8.1.2 | Help Integration | Hover over the *Outlet* feature. | The help text for that feature appears in a popup window. | %{color:red}open% |
| 8.1.3 | Help Integration | Add the *Debug* feature to the sgen file:<p>&emsp;@feature Debug {@<br>&emsp;@dumpSexec = true@<br>&emsp;@}@</p><p>Hover over the *Debug* feature.</p> | The help text for that feature appears in a popup window. | %{color:red}open% |
| 8.1.4 | Help Integration | Add the *FunctionInlining* feature to the sgen file:<p>&emsp;@feature FunctionInlining {@<br>&emsp;@}@</p><p>Hover over the *FunctionInlining* feature.</p> | The help text for that feature appears in a popup window. | %{color:red}open% |
| 8.1.5 | Help Integration | Add the *GeneralFeatures* feature to the sgen file:<p>&emsp;@feature GeneralFeatures {@<br>&emsp;@}@</p><p>Hover over the *GeneralFeatures* feature.</p> | The help text for that feature appears in a popup window. | %{color:red}open% |
| 8.1.6 | Help Integration | Add the *LicenseHeader* feature to the sgen file:<p>&emsp;@feature LicenseHeader {@<br>&emsp;@licenseText = ""@<br>&emsp;@}@</p><p>Hover over the *LicenseHeader* feature.</p> | The help text for that feature appears in a popup window. | %{color:red}open% |
| 8.1.7 | Help Integration | Add the *Naming* feature to the sgen file:<p>&emsp;@feature Naming {@<br>&emsp;@basePackage = "my.base.name"@<br>&emsp;@implementationSuffix = "mysuffix"@<br>&emsp;@}@</p><p>Hover over the *Naming* feature.</p> | The help text for that feature appears in a popup window. | %{color:red}open% |
| 8.1.8 | Help Integration | Add the RunnableWrapper feature to the sgen file:<p>&emsp;@feature RunnableWrapper {@<br>&emsp;@}@</p><p>Hover over the RunnableWrapper feature.</p> | The help text for that feature appears in a popup window. | %{color:red}open% |
| 8.1.9 | Open Statechart | Open file StaircaseJava.sgen<p>Hover over the statechart reference and press *Ctrl*</p><p>Click on the hyperlink | Statechart opens in statechart diagram editor</p> | %{color:red}open% |
| 8.2 | Create Generator Model for C | Select TestProject in project explorer.<p>Select *File→New→Other* from the menu.</p><p>Select *YAKINDU SCT→Code Generator Model*.</p><p>Click *Next*.</p><p>As file name, enter StaircaseC.sgen. </p><p>Click *Next*.</p><p>Select YAKINDU SCT C Code Generator and check Staircase.sct.</p><p>Click on *Finish* button.</p> | File StaircaseC.sgen has been created with initial settings.<p>Folders src and src-gen have been created and populated by builder.</p> | %{color:red}open% |
| 8.2.1 | Change Output Folder | Open file StaircaseC.sgen.<p>Change targetFolder to from src-gen to src-gen-c.</p><p>Save the file by e.g. pressing *[Ctrl+S]*.</p> | Folder src-gen-c has been created and populated with with generated code. | %{color:red}open% |
| 8.3 | Create Generator Model for C++ | Select TestProject in project explorer.<p>Select *File→New→Other* from the menu.</p><p>Select *YAKINDU SCT→Code Generator Model*.</p><p>Click *Next*.</p><p>As file name, enter StaircaseCpp.sgen. </p><p>Click *Next*.</p><p>Select YAKINDU SCT C++ Code Generator and check Staircase.sct.</p><p>Click on *Finish* button.</p> | File StaircaseCpp.sgen has been created with initial settings.<p>Folders src and src-gen have been created and populated by builder.</p> | %{color:red}open% |
| 8.3.1 | Change Output Folder | Open file StaircaseCpp.sgen.<p>Change targetFolder to from src-gen to src-gen-cpp.</p><p>Save the file by e.g. pressing *[Ctrl+S]*.</p> | Folder src-gen-cpp has been created and populated with with generated code. | %{color:red}open% |
| 8.4 | Create Generator Model for Custom Xpand Generator | Select TestProject in project explorer.<p>Select *File→New→Other* from the menu.</p><p>Select *YAKINDU SCT→Code* Generator Model.</p><p>Click *Next*.</p><p>As file name, enter StaircaseXpand.sgen.</p><p>Click *Next*.</p><p>Select Custom Xpand-based Generator and check Staircase.sct.</p><p>Click on *Finish* button.</p> | File StaircaseXpand.sgen has been created with initial settings. | %{color:red}open% |
| 8.4.1 | Add project to build path | Open the properties of the TestProject project (*rightclick → Properties or [Alt+Enter]*).<p>Select *Java Build Path*.</p><p>Select tab *Projects*.</p><p>Click *Add…*.</p><p>Add TestProject.generator.xpand.</p><p>Click *OK*.</p> | No errors occurred. | %{color:red}open% |
| 8.4.2 | Setup Xpand Generator Model | Open the file StaircaseXpand.sgen and set the following features:<p>&emsp;- targetFolder = "src-gen-xpand"<br>&emsp;- templateProject = "TestProject.generator.xpand"<br>&emsp;- templatePath = "testproject::generator::xpand::TextGenerator::main"<p>Save the file</p> | Folder src-gen-xpand with generated code created. | %{color:red}open% |
| 8.5 | Create Generator Model for Custom Xtend/Java Generator | Select TestProject in project explorer.<p>Select *File→New→Other* from the menu.</p><p>Select *YAKINDU SCT→Code Generator Model*.</p><p>Click *Next*.</p><p>As file name, enter StaircaseXtend.sgen.</p> <p>Click *Next*.</p><p>Select Custom Xtend2/Java-based Generator and check Staircase.sct.</p><p>Click on *Finish* button.</p> | File StaircaseXtend.sgen has been created with initial settings. | %{color:red}open% |
| 8.5.1 | add Project to buildpath | Open the properties of the TestProject project (*rightclick → Properties or [Alt+Enter]*).<p>Select *Java Build Path*.</p><p>Select tab *Projects*.</p><p>Click *Add…*.</p><p>Add TestProject.generator.xtend.</p><p>Click *OK*.</p> | No errors occurred. | %{color:red}open% |
| 8.5.2 | Setup Xtend Generator Model | Open the file StaircaseXtend.sgen and set the following features:<p>&emsp;- targetFolder = "src-gen-xtend"<br>&emsp;- generatorProject = "TestProject.generator.xtend"<br>&emsp;- generatorPath = "testproject.generator.xtend.XtendGenerator"</p><p>Save the file. | Folder src-gen-xtend with generated code created.</p> | %{color:red}open% |




