Commit dd3b0c1c authored by Kai-Holger Brassel's avatar Kai-Holger Brassel
Browse files

Two of four parts nearly finished

parent f63ec247
== Accessing and Using Parameter Catalogs
=== Accessing XML-Catalogs
.Add Ecore data model to a third-party Java application
*TBD*
import java.util.Collection;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import de.hftstuttgart.energycomponents.EnCompPackage;
import de.hftstuttgart.energycomponents.HeatPump;
ResourceSet resSet = new ResourceSetImpl();
Resource resource = resSet.getResource(URI.createURI("catalog.xml"), true);
Collection<HeatPump> allHeatPumps = EcoreUtil.getObjectsByType(
resource.getContents(), EnCompPackage.eINSTANCE.getHeatPump());
catalog.xml muss durch den richtigen Pfad zum XML-Katalog ersetzt werden.
.Load XML Data Catalog and Access Corresponding Java Objects in Code
*TBD*
.Access from Python?
*TBD*
=== Create Insel Models with Handlebars Templates
Handlebar templates to access data catalogs and create/parameterize textual simulation models.
.Parameterization of blocks
*TBD*
.Creation of submodels, e.g. computing parameterized functions
*TBD*
== Build (Parameter Catalog) Applications with Eclipse Tycho
Three plugins so for for the content and UI.
Missing: Deployable application and inclusion to third party libraries.
Building an application "around" the three plugins for Ecore data model and UI specification model.
See template.
=== Create an Eclipse Application
*TBD*
=== Use Maven and Tycho as Build System
.Install Maven Support
We are going to create a complete Eclipse desktop application from generated code.
We also want to deploy this application for Linux, macOS and Windows operating systems.
Eclipse offers several approaches for compiling and deploying such an application, traditionally with _Ant_ scripts.
Creation and maintenance of these scripts turned out to be tedious and error prone.
For quite some years now, the proposed -- and mostly supported -- method for building Eclipse applications is to use _Maven_ build system, more specifically, a couple of Maven plug-ins, subsumed under the name _Tycho_.
Many Eclipse platforms have Maven support https://www.eclipse.org/m2e/[_M2Eclipse_] already built in, not so our _Eclipse Modeling Tools_.
But don't worry: Installation of required Eclipse feature is easy and straight forward.
And, by the way, you will acquire the indispensable skill of how to install new plug-ins/features to Eclipse.
First, tell your Eclipse installation where to look for the new software.
Execute `Help -> Install new Software...` to invoke dialog _Available Software_ and press `Add...`.
Sub-dialog `Add Repository` pops up.
.Add update site m2e
image::InstallMaven1.gif[InstallMaven1, role="thumb"]
In there provide `m2e` as name and
http://download.eclipse.org/technology/m2e/releases
as location.
After confirmation with `Add`, Eclipse now looks up the site for available software.
.Choose features to install
image::InstallMaven2.gif[InstallMaven2, role="thumb"]
Check the items to install like shown above and confirm all following questions about licenses and security concerns.
After download is complete -- it can take a few minutes -- restart Eclipse.
Verify that Maven version 3.6.3 or above is now installed in `Window -> Preferences...` (or `Eclipse -> Preferences...` on macOS) under `Maven -> Installations`.
.Check Maven installation
image::InstallMaven3.gif[InstallMaven3, 400, role="thumb"]
."Mavenize" projects
*TBD*
.Build and Deploy with Tycho
*TBD*
.Add third party Java libraries
*TBD*
"Correct" way to add third party Java libraries as plugins
Example Indriya
=== Deploy to P2 Repository
*TBD*
=== Versioning and Collaboration
*TBD*
# parameter-catalogs-howto
# Parameter Catalogs for Simulation
Exhaustive tutorial on how to create parameter catalogs - e.g. for energy devices, building physics, building usage - based on Ecore and other Eclipse technologies.
\ No newline at end of file
***Still Work in progress !!***
Exhaustive tutorial on how to create parameter catalogs - e.g. for energy devices, building physics, building usage - based on Ecore and other Eclipse technologies.
Includes background information, a gentle introduction to Ecore data modeling and step-by-step instructions on how to generate editor applications from data model.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment