The Model modeling language (MML) is a domain-specific modeling language implemented with the open-source language engineering tool Langium. This repository contains all resources to include the MML in Eclipse. Through this we provide an editor for MML files, as well as the export of metamodels and instances to Ecore and XMI files.
For this purpose, an MML Language Server is started when the MML Editor is opened for the first time. Afterwards the editor is displayed as a web page in a webview in a JavaFX window. However, this also makes it clear that a large number of components have to be built and interact.
ℹ️ The MML Editor was tested on Windows 11 under Eclipse 2023-09 with Java 17.
- Build the web editor first. For simplicity, we provide a Maven build script. For this, the following command can be
executed:
(If Maven is not available, the web editor must be built separately first. Follow the instructions for this. Afterwards the generated files have to be copied from
mvn process-resources
model-modeling-language-browser/public
tomodel-modeling-language-eclipse/MML-Editor/ls
) - Open the workspace
model-modeling-language-eclipse
in Eclipse and import the projectsJavaFXDependencies
andMML-Editor
. - Install required Eclipse plugins:
- Install JavaFx and check that the path to the JavaFx bin directory is added to the Path environment
variable. Alternatively, the resources provided in
model-modeling-language-eclipse/bin
can be used. (Windows only, check HERE for other operating systems) - Right click on the MML Editor project and select
Run As -> Eclipse Application
. This will start a new Eclipse instance containing the MML editor. At startup it will ask for a new workspace. If the provided resources are used instead of an installation of JavaFx, the path environment variable must also be adjusted for this. Alternatively, this can be done temporarily. For this go toRun As -> Run Configurations...
, select the Eclipse Application Configuration, open the Arguments tab and set the following VM argument:-Djava.library.path="${workspace_loc}\bin;${env_var:PATH}"
First create a .mml
file. When you right-click on it, there is a new entry in the context menu.
Click on Open in MML Editor
. The first opening may take a few seconds (a loading screen is displayed), because
the language server is started in the background first.
We provide several functions via the menu. If the same (or another) file in the same workspace has been modified externally, either all, only the current or all other models can be reloaded. Likewise, changes made in the editor can be saved in the file system.
Finally, MML files can be compiled and converted to EMF files. To do this, select the Export Model
function.
This will transfer all packages to Ecore files and all instances to XMI files. The exported files are located in the
model
directory of the project.
The workspace model-modeling-language-examples
serves as a collection of examples. Among others, this includes
an implementation of
the HospitalExample, which has already
been used as an example for eMoflon::IBeX.