Git Product home page Git Product logo

model-modeling-language-editor's Introduction

Model Modeling Language Editor

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.

⚠️ Due to incompatibilities of JavaFx with GTK, the MML editor currently cannot be used under Linux!



How to build

  1. Build the web editor first. For simplicity, we provide a Maven build script. For this, the following command can be executed:
    mvn process-resources
    (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 model-modeling-language-browser/public to model-modeling-language-eclipse/MML-Editor/ls)
  2. Open the workspace model-modeling-language-eclipse in Eclipse and import the projects JavaFXDependencies and MML-Editor.
  3. Install required Eclipse plugins:
    • WildWebDeveloper (Link)
    • Google Gson (Link)
  4. 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)
  5. 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 to Run 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}"
    

Usage

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.

Examples

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.

model-modeling-language-editor's People

Contributors

janiknex avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.