ESDL
  • ESDL Documentation
  • Introduction
  • Energy Data Modelling
  • ESDL concepts
    • Design principles
    • Energy System structure
    • Data types
      • Energy System
      • Areas
      • Items, Assets, EnergyAssets and Services
        • Overview of EnergyAssets
      • Profiles
      • Energy System Information
        • Carriers
        • DataSources
        • Mobility Fuel Information
        • Profiles
        • Quantities And Units
        • Sectors
      • KPIs
    • ESDL model
  • How to use ESDL
    • Using ESDL to model an energy system
      • Setup Eclipse using the update site
      • ESDL Tree editor
      • ESDL Graphical editor / ESDL Designer
    • Example ESDL models
      • Describing a house
      • Describing a municipality
      • Describing a profile
  • ESDL models and tools
    • ESDL MapEditor
    • Energy System Simulator (ESSIM)
    • Energy Data Repository (EDR)
  • ESDL related projects
    • Warming Up
    • Mondaine
  • Software development with ESDL
    • Integration with Java
    • Integration with Python and pyEcore
    • Jupyter Notebook ESDL tutorial
  • Contributing to ESDL
    • Setting up the Eclipse Modelling Tools
      • Generating model, edit and editor code
  • Contact
  • ESDL Release Notes
  • ESDL Color Scheme
Powered by GitBook
On this page
  1. Contributing to ESDL
  2. Setting up the Eclipse Modelling Tools

Generating model, edit and editor code

PreviousSetting up the Eclipse Modelling ToolsNextContact

Last updated 6 years ago

Since Ecore-based models such as the ESDL model contain semantics, source code can be generated from this model. EMF allows you to create three different types of source code:

  • ESDL Model code - creates Java-classes out of the model, including the ECore semantics (they inherit from theEObject-class)

  • ESDL Edit code - creates editor-independent code to manipulate and edit the ESDL model instances.

  • ESDL Editor code - creates the Tree-based editor described to edit ESDL model instances.

Using the .genmodel

Code generation is specified in the esdl.genmodel file. In Eclipse you can open this file in its own editor. In the properties there are a lot of options you can configure to change the code generation behaviour.

When right-clicking on the esdl-package you can select Generate... to generate one or more of the above mentioned artefacts, or press Ctrl+Shift+G to pop-up the Generator dialog.

The current esdl.genmodel is configured to produce an XML Schema too, that can be used by other non-Java-based software. The next chapters shows how to integrate with e.g. Python.

here