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

Some updates and corrections

parent 63b57576
== How to Implement Parameter Catalogs with Eclipse
:imagesdir: ParameterCatalogs2Images
To build a new parameter catalog from scratch, we first have to understand some basics about Eclipse, and then install the correct Eclipse package.
Thereafter, we can model our data with Ecore considering some best practices, followed by the generation of Java classes and user interface (UI).
We, then, will add some plug-ins to "pimp" our Eclipse installation, (a) to enable deployment of parameter catalog applications, and (b) to add units and quantities to the mix.
Some hints on special modeling problems and versioning parameter catalogs conclude this how-to guide.
At the end of this chapter, you should be able to build a running software prototype for creating and maintaining parameter catalogs based on a graphical data model of the domain you are an expert in.
To build data models and parameter catalogs from scratch, we first have to understand some basics about Eclipse, and then install the correct Eclipse package.
Thereafter, we can model our data with _Ecore_ considering some best practices, followed by the generation of Java classes and user interface (UI).
Finally, we will install some plug-ins to "pimp" our Eclipse installation in order to add units and quantities to the mix.
=== Eclipse Basics
......@@ -27,20 +29,17 @@ Note that third parties offer many other packages, e.g. _GAMA_ for multi-agent-s
Several Eclipse packages can be installed side by side, even different releases of the same package. Multiple Eclipse installations can run at the same time, each on its own _workspace_ (see below).
====
.Plug-ins / Features
An installed Eclipse package consists of a runtime core and a bunch of additional plug-ins.
Technically, a plug-in is just a special kind of Java archive (JAR file) that uses and can be used by other plug-ins with regard to OSGi specifications.
Groups of plug-ins that belong together are called a _feature_.
Often, a user will add plug-ins or features to an Eclipse installation to add new capabilities.
Sometimes, a user will add plug-ins or features to an Eclipse installation to add new capabilities.
E.g. writing this documentation within my Eclipse IDE is facilitated by the plug-in https://marketplace.eclipse.org/content/asciidoctor-editor[Asciidoctor Editor].
Plug-ins can easily be installed via main menu command `Help → Eclipse Marketplace...` or `Help → Install New Software...`.
Some plug-ins may be self-made like our plug-in `de.hftstuttgart.units` that enables Ecore to deal with quantities.
These may be provided via _Git_ or as download and have to be added to an Eclipse installation manually.
Some plug-ins may be self-made like our _City Units_ plug-in that enables Ecore to deal with physical quantities.
.Git
https://git-scm.com[Git] is the industry standard for collaborative work on, and versioning of, source code and other textual data.
......@@ -65,7 +64,6 @@ Any plug-in from the original Eclipse package or installed by the user later wil
Configuration and current state of plug-ins, on the other hand, are stored in workspaces.
====
.Projects
An Eclipse project is a technical term for a directory that often contains:
......@@ -97,17 +95,16 @@ That way, we can follow the convention that local Git repositories should all be
.Install Java
Eclipse runs on 64-bit versions of Windows, Linux, and macOS and requires an according Java Development Kit (JDK), version 11 or higher, to be installed on your machine.
Even if such JDK already exists, please download OpenJDK, version *15* or newer for your operating system from https://adoptopenjdk.net[AdoptOpenJDK].
Even if such JDK already exists, please download OpenJDK, version *16* or newer for your operating system from https://adoptopenjdk.net[AdoptOpenJDK].
footnote:[AdoptOpenJDK recently joined the Eclipse foundation and soon will change its name to _Adoptium_ for legal reasons.]
Choose `HotSpot` as Java Virtual Machine.
Installation process is straight forward, but you can also find links to exhaustive instructions for your operating system.
New Java versions appear every six months, so one could tend to stick with older version 11 that comes with long time support (LTE) until next LTE version 17 arrives in autumn 2021.
However, actual version 15 conforms to the latest security measures built into macOS Catalina, so it is a must if software we build here shall be deployed to these systems, too.
However, actual version 16 conforms to the latest security measures built into macOS Catalina, so it is a must if software we build here shall be deployed to these systems, too.
Note that different versions of Java coexist peacefully.
.Install Eclipse Modeling Tools
Now its time to download and install the correct Eclipse package _Eclipse Modeling Tools_, version 2021-03 or newer.
......@@ -168,10 +165,10 @@ Since it is not always clear where names provided during modeling are used later
| Namespace URI | http://example.org/democatalog | http://hft-stuttgart.de/buildingphysics
| Namespace Prefix | democat | buildphys
| Base Package (reverse domain)footnote:[https://en.wikipedia.org/wiki/Reverse_domain_name_notation]
| org.example | hft-stuttgart.de
| org.example | de.hftstuttgart
| Main Package | democatalog | buildingphysics
| Eclipse Projectfootnote:[https://wiki.eclipse.org/Naming_Conventions#Eclipse_Workspace_Projects]
| org.example.democatalog.model | de.hft-stuttgart.buildingphysics
| org.example.democatalog.model | de.hftstuttgart.buildingphysics
| Class Prefix | Democatalog | Buildingphysics
| XML File Suffix | democatalog | buildingphysics
| Classes | e.g. SolarPanel | e.g. WindowType
......
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