* The project can be built using Maven or Eclipse (or also Maven in Eclipse (M2E))
* For development it is recommended to setup an Eclipse environment
* Maven is best used for Continuous Integration (CI) and testing as it takes a while to resolve dependencies upon every build
* To get started and make sure everything is set up and running:
* download and setup Java 21 (if missing): []([https://adoptium.net/en-GB/marketplace/)
* download and setup Eclipse Java and DSL Package: [](https://www.eclipse.org/downloads/packages/release/2024-09/r/eclipse-ide-java-and-dsl-developers)
* download and setup Java 21 or newer (if missing): []([https://adoptium.net/en-GB/marketplace/)
* download and setup Eclipse Java and DSL Package (2024-09 or newer): [](https://www.eclipse.org/downloads/packages/release/2024-09/r/eclipse-ide-java-and-dsl-developers)
* can also be done in Eclipse, which can streamline the subsequent project import
* start Eclipse and click on “Import projects…” in the “Project Explorer” (or via File -> Import in the menu)
* select “General” -> “Existing Projects into Workspace”
* press “Browse…” next to “Select root directory” and open the folder where the git repo was cloned
* make sure "Search for nested projects" is selected
* do not select "Copy projects into workspace"
* press “Finish” with all projects selected
* select the target plaform in `de.ugoe.cs.swe.TTCN3.target/de.ugoe.cs.swe.TTCN3.target.target` as active target platform (may need to be reloaded first)
* a separate development target platform extending the base target platform defined in `de.ugoe.cs.swe.TTCN3.target/t3tools.dev.target` can be used in particular when testing in a UI-enabled environment
* run the “GenerateTTCN3.mwe2” script to generate the missing resources
* open `de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/GenerateTTCN3.mwe2`
* right click -> “Run as” -> “MWE2 Workflow”
* an automated build should start after the script is finished
* an automated build should start after the script is finished, otherwise build the workspace manually ("Build All" from the "Project" menu)
### Running and testing
* Console tool
* run “T3Q” to make sure everything works
* “Run” -> “Run configurations...” from the menu
* select “Java Application” -> “T3Q”
* press “Run”
* you should get an Error in the console that no input was provided
* you should get an Error in the console that no input was provided, you can customise the launch configuration to your needs as suggested below
* same as above, but select the “T3Q (sample)” launch configuration
* before pressing “Run”, select the “Arguments” tab and append the path to where the t3q-resources repo was cloned
* press “Apply” to save, subsequent launching of “T3Q (sample)” will use this path
* press “Run”
* Eclipse IDE plugins
* run the T3Tools Complete configuration
* it starts a new Eclipse instance including the T3Tools plugins and the target platform components
* for faster starting times, the T3Tools Basic configuration can be used, which only inlcudes the minimum necessary components, however, it may require adjustments depending on the Eclipse version
* it is recommended to use the Xtext Tools from Oliver Libutzki [](https://github.com/OLibutzki/xtext.tools) which provide synchronised views for the Node Model and Semantic Model to understand the parsed structures
* the tools are included in the development target platform, but may need to be enabled in the launch configuration
### Extension and modification
* To update the grammar to support newer versions:
* update the `TTCN3.xtext` file with the desired changes
* run the “GenerateTTCN3.mwe2” script to re-generate the different resources
* ambiguities or other may cause the script to fail, address these issues immediately, or roll-back
* address any immediate issues in the different projects (likely scoping, validation, etc.)
* test extensively for more subtle problems, e.g. with reference resolution / scoping, etc.
* in general, check the differences and dependencies in the BNF at [](http://www.trex.informatik.uni-goettingen.de/trac/wiki/ttcn3-bnf)
* To extend the quality checker:
* create examples of what should be checked
* modify the corresponding implementations under `de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation`, e.g. in the `CodeStyleValidator.xtend`
* if new features are added, define a configuration key in `de.ugoe.cs.swe.TTCN3Configuration/src/de/ugoe/cs/swe/TTCN3Configuration/QualityCheckProfile.java` and update the corresponding configuration profiles
* in general if new features are added, the version should be incremented
* To extend the usage analyzer:
* run “T3Q” with the usage analysis option
* open the “T3Q (sample)” launch configuration (or duplicate in a new one)
@@ -50,7 +82,7 @@ TODO: Migrate and update
* see the example analyses with loops and streams, immediate output and collected/synchronised output