Skip to content

Latest commit

 

History

History
64 lines (40 loc) · 4.2 KB

File metadata and controls

64 lines (40 loc) · 4.2 KB

Getting Ready

OML has a user-friendly textual grammar that can be edited using a simple text editor. However, for extra support like wizards, syntax highlighting, live validation, and content-assist, a user can use one of the OML editors provided by openCAESAR project. One such editor, called OML Rosetta, is a plugin to the Eclipse IDE. Another editor, called OML Luxor, is an extension to the VSCode IDE that can be used in a VSCode desktop client or browser-based client (like Gitpod). In this tutorial, we will demonstrate using the OML Rosetta editor, but the reader can follow using any other editor.

Note: that OML also has a UML-like graphical notation. Although we will not demonstrate how to create them, we will sometimes show OML diagrams to help visualize the models.

Furthermore, OML projects created by openCAESAR are Gradle projects that have OML analysis tools configured as Gradle tasks (in a build.gradle script). A user can choose to invoke such tools from a console/terminal session using the Gradle Wrapper CLI (e.g., ./gradlew <task>). Alternatively, the supported OML editors mentioned above allow invoking those Gradle tasks using a UI. We will demonstrate invoking Gradle tasks from the UI in Eclipse, but the reader can choose to invoke them using the CLI (or another UI) instead.

Install OML Rosetta ## {#install-oml-rosetta}

  1. Download the latest release of OML Rosetta archive that matches your OS from oml-rosetta.

  2. Unzip the archive to some folder on your local drive to get the Rosetta app.

    Note: If you're on a Mac, run this command in the terminal to get around the issue that the app is not yet signed (a temporary issue).

     $xattr -cr <path/to/Rosetta.app>
  3. Navigate to the Rosetta app icon and double click to run it.

  4. When prompted to choose a workspace, create a new one in your local file system.

Run OML Rosetta ## {#run-oml-rosetta}

  1. Once Rosetta opens with the workspace, switch to the Modeling Perspective.

  2. Once the Modeling Perspective opens, make some extra views visible.

  3. This is how the Modeling Perspective should look like now.

    Notice the following components of the Modeling Perspective above:

    1. Model Explorer view (top-left): shows your project files hierarchy.

    2. Properties view (bottom-right): shows detailed property sheet of the selection.

    3. Problems view (bottom-right): shows problems (errors, warnings) with your projects.

    4. Gradle Tasks view (bottom-right): shows the list of Gradle tasks in your projects.

    5. Gradle Executions view (bottom-right): shows the details of execution of Gradle tasks.

    6. Console view (bottom-right): shows messages printed by Gradle tasks.

    7. Editors (top-right): this area shows the open editors (if any).

    8. Outline view (bottom-left): shows the outline of content in the active editor.

    9. Turn on the Show line number preference by navigating to the Preferences dialog in the main menu bar (on a Mac, you will find it under the Rosetta menu; on Windows, you will find it under the Windows menu).