diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index f69a10698e..92231be961 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -25,7 +25,7 @@ information about the example `Automata` language are available in We start with the JDK: Please perform the following steps to install the Java Development Kit (JDK) and validate that the installation was successful: -- Install a JDK with at least version 11 provided by Oracle or OpenJDK. +- Install a JDK with version 11 provided by Oracle or OpenJDK. - Make sure the environment variable `JAVA_HOME` points to the installed JDK, and *not* to the JRE, e.g., the following would be good: - `/user/lib/jvm/java-11-openjdk` on UNIX or @@ -41,7 +41,7 @@ Java Development Kit (JDK) and validate that the installation was successful: any directory. Execute the command `javac -version`. If this command is recognized and the shell displays the version of the installed JDK (e.g., `javac 11.0.5`), then the setup was successful. -- *(Optional)* Install [Gradle](https://gradle.org/install/) version 7.6. +- *(Optional)* Install [Gradle](https://gradle.org/install/) version 7.6.4. Now we have the prerequisites to run MontiCore from the command line (CLI) or alternatively using Gradle. @@ -823,7 +823,7 @@ adding the CoCos, and calling the `checkAll` method. #### Mill as Factory for Builders -The for the `Automata` language is generated into the directory +The mill for the `Automata` language is generated into the directory `out/automata/`. Details about the generated mill and the mill pattern in general are described in Section 11.5. The generated mill class `AutomataMill` is responsible for providing ready to use and correct parser, scope @@ -897,6 +897,11 @@ from a MontiCore grammar. For these Java classes, generated for the `Automata` DSL, execute the following command in the mc-workspace: === "CLI" + **With cmd on Windows** + ```batch + javac -cp monticore-rt.jar -sourcepath "src/;out/;hwc/" ^ + src/automata/AutomataTool.java + ``` **With Powershell on Windows** ```powershell javac -cp monticore-rt.jar -sourcepath "src/;out/;hwc/" ` @@ -907,11 +912,6 @@ from a MontiCore grammar. For these Java classes, generated for the javac -cp monticore-rt.jar -sourcepath "src/:out/:hwc/" \ src/automata/AutomataTool.java ``` - **With cmd on Windows** - ```batch - javac -cp monticore-rt.jar -sourcepath "src/;out/;hwc/" ^ - src/automata/AutomataTool.java - ``` Please note, on Unix systems paths are separated using ":" (colon) instead of semicolons. @@ -1198,6 +1198,12 @@ including the `Automata` tool class `AutomataTool`. For running the `Automata` DSL tool, execute the following command: === "CLI" + **With cmd on Windows** + ```batch + java -cp "src/;out/;hwc/;monticore-rt.jar" ^ + automata.AutomataTool -i example/PingPong.aut ^ + -s st/PingPong.autsym + ``` **With Powershell on Windows** ```powershell java -cp "src/;out/;hwc/;monticore-rt.jar" ` @@ -1210,12 +1216,6 @@ including the `Automata` tool class `AutomataTool`. For running the automata.AutomataTool -i example/PingPong.aut \ -s st/PingPong.autsym ``` - **With cmd on Windows** - ```batch - java -cp "src/;out/;hwc/;monticore-rt.jar" ^ - automata.AutomataTool -i example/PingPong.aut ^ - -s st/PingPong.autsym - ``` Please note again, on Unix systems paths are separated using ":" (colon) instead of semicolons. Executing the command runs the `Automata` @@ -1232,6 +1232,12 @@ including the `Automata` tool class `AutomataTool`. For running the **With JUnit** Run the `AutoamtaToolTest` JUnit test. + **With cmd on Windows** + ```batch + java -jar target/libs/automaton-7.7.0-tool.jar ^ + -i src/test/resources/automata/parser/PingPong.aut ^ + -s st/PingPong.autsym + ``` **With Powershell on Windows** ```powershell java -jar target/libs/automaton-7.7.0-tool.jar ` @@ -1244,12 +1250,6 @@ including the `Automata` tool class `AutomataTool`. For running the -i src/test/resources/automata/parser/PingPong.aut \ -s st/PingPong.autsym ``` - **With cmd on Windows** - ```batch - java -jar target/libs/automaton-7.7.0-tool.jar ^ - -i src/test/resources/automata/parser/PingPong.aut ^ - -s st/PingPong.autsym - ``` You will have to run `gradle build` to create the tool.jar. @@ -1265,7 +1265,7 @@ example `Automata` model. The last argument `st/PingPong.autsym` is also passed to the main method. It makes the tool store the serialized symbol table of the input -model into the file `example/PingPong.aut`. +model into the file `st/PingPong.autsym`. The shipped example `Automata` DSL (all sources contained in `mc-workspace/src` and `mc-workspace/hwc`) can be used as a starting @@ -1364,7 +1364,7 @@ http://www.monticore.de/download/Automaton.zip ``` 2. In the IDE select: File \> Open. 3. Select the directory containing the build.gradle (if you are - required to choose a Gradle version, then choose version 6.7.1). + required to choose a Gradle version, then choose version 7.6.4). ### Running MontiCore @@ -1383,39 +1383,6 @@ MontiCore in IntelliJ IDEA, your workspace should look similar to Figure 2.29. ![](https://github.com/MontiCore/monticore/raw/dev/docs/img/IntelliJ-IDEA.png)
Figure 2.29: IntelliJ IDEA after importing the example project and executing MontiCore
- -## Using MontiCore with GitPod - -Installing all the prerequisites and an IDE can take some time. -Alternatively to this, you can use [Gitpod](https://www.gitpod.io), an open-source -Kubernetes application for ready-to-code developer environments. It already -has all the prerequisites and an operational Web IDE similar to Microsoft's -Visual Studio Code installed. You need to login with an existing GitHub account -to use it. - -[This link](https://gitpod.io/#https://github.com/MontiCore/automaton) can be used -to access the Gitpod project for the `Automata` language. -First, an environment for the project with the proper Java and Gradle version -will be prepared and initialized automatically. -After that, you will be directed to the Web IDE. The project will be built -with Gradle first, and after that it is ready-to-use. The Web IDE also has a -built-in terminal which can be used to build the project via `gradle build` -or execute other tasks. - -The Web IDE can be used to change existing project files, such as the `Automata` -grammar or the handwritten classes for the language. Simply navigate to the grammars -or classes in the file explorer on the left-hand side of the IDE and edit the files. -This makes experimenting with MontiCore possible. The changes will be compiled by the -IDE immediately and compilation errors will be marked with red color. To run the project, -execute the command `gradle build` in the terminal. - -You will notice that the link to the Gitpod project is generated and always -has the same pattern. -An example for a link is https://indigo-ostrich-8psdfoer.ws-eu18.gitpod.io. -After 30 minutes of non-use, Gitpod will "freeze" the environment. -It can be reactivated by using the same link to access it. The environment is -reactivated, and you do not even need to rebuild the project with Gradle to use -the project again. ## Further Information