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:
-
Download one of the predefined Eclipse packages depending on your OS:
-
Clone/Download this repository to your harddrive.
-
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 hittingFile > Open Projects from File System...
, then choosing the parent folder of the cloned/downloaded projects asImport source
, and after the projects were loaded hittingFinish
.
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.
To try out the Xcore and Xtext examples, you have to do the following:
-
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 chooseRun As > Eclipse Application
. A new runtime Eclipse instance is opened. -
In the runtime Eclipse instance switch to the workbench and create a new
Java Project
entitled, e.g.,Test
. -
In the new
Test
project create a file with the extension.struct
and the nameMyStructure
, i.e., the file's full name isMyStructure.struct
. Confirm any subsequent dialogs withYes
. -
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.
To try out the LEMMA examples, you have to do the following:
-
Open the project
LEMMA-examples
which you imported into your workspace in step 3 above. -
Within the project you will find different folders.
- The
domain models
folder comprises the domain modelsBanking.data
andStudent.data
expressed in LEMMA's Domain Data Modeling Language. - The
microservices
folder comprises the service modelsBanking.services
andStudent.services
expressed in LEMMA's Service Modeling Language. - The
operation
folder comprises the operation modelArchitecture.operation
expressed in LEMMA's Operation Modeling Language. - The
technology
folder comprises the Java technology model (filejava.technology
) used throughout the lectures. You are invited to explore and play around with it, in case you are curious.
- The
[1] https://wiki.eclipse.org/EMF
[2] https://wiki.eclipse.org/Xcore
[3] https://www.eclipse.org/Xtext
[4] https://github.com/SeelabFhdo/lemma