Skip to content

SeelabFhdo/sep2021

Repository files navigation

Eclipse Modeling Framework and LEMMA Examples

This repository contains usage examples of tools from or based on the Eclipse Modeling Framework (EMF) [1], and UML examples. The usage examples show

  • the implementation of an abstract and concrete syntax for a textual language for modeling simple data structures (used tools: Xcore and Xtext [2,3]).
  • models that represent different views on a microservice architecture and which are expressed with the Language Ecosystem for Modeling Microservice Architectures (LEMMA) [4].

To play around with the provided examples, follow these steps:

  1. Download one of the predefined Eclipse packages depending on your OS:

  2. Clone/Download this repository to your harddrive.

  3. Run the eclipse executable in the package you downloaded in step 1, create a workspace as requested by the IDE, and import the projects you cloned/downloaded in step 2. Projects can be imported in Eclipse by hitting File > Open Projects from File System..., then choosing the parent folder of the cloned/downloaded projects as Import source, and after the projects were loaded hitting Finish.

Now that you have imported all projects into your workspace, you can try out the usage examples. The execution of the examples is technology-specific.

Running the Xcore and Xtext Usage Examples

To try out the Xcore and Xtext examples, you have to do the following:

  1. Right click on the project de.fhdo.sep.ml_example.xtext which you imported into your workspace in step 3 above and from the context menu choose Run As > Eclipse Application. A new runtime Eclipse instance is opened.
  2. In the runtime Eclipse instance switch to the workbench and create a new Java Project entitled, e.g., Test.
  3. In the new Test project create a file with the extension .struct and the name MyStructure, i.e., the file's full name is MyStructure.struct. Confirm any subsequent dialogs with Yes.
  4. In the open editor showing the empty file MyStructure.struct, enter the following piece of code that conforms to the syntax of the Data Structure Modeling Language:
    context Accounting {
      structure ParkingSpace {
        string name,
        string description,
        boolean isOpen,
        double longitude,
        double latitude
      }
    }
    

The editor highlights the code according to what you have seen in the MDE lecture.

Running the LEMMA Examples

To try out the LEMMA examples, you have to do the following:

  1. Open the project LEMMA-examples which you imported into your workspace in step 3 above.
  2. Within the project you will find different folders.
    • The domain models folder comprises the domain models Banking.data and Student.data expressed in LEMMA's Domain Data Modeling Language.
    • The microservices folder comprises the service models Banking.services and Student.services expressed in LEMMA's Service Modeling Language.
    • The operation folder comprises the operation model Architecture.operation expressed in LEMMA's Operation Modeling Language.
    • The technology folder comprises the Java technology model (file java.technology) used throughout the lectures. You are invited to explore and play around with it, in case you are curious.
You can double click on each of the mentioned files to open the editor that shows the contained model according to the syntax of the respective modeling language and play around with the models leveraging the editor.

References

[1] https://wiki.eclipse.org/EMF
[2] https://wiki.eclipse.org/Xcore
[3] https://www.eclipse.org/Xtext
[4] https://github.com/SeelabFhdo/lemma

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published