Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Last active Jun 28, 2021
Embed
What would you like to do?
Eclipse - Domain-Specific Modeling
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Mon Jun 28 2021 09:21:44 GMT-0400 (Eastern Daylight Time)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Eclipse - Domain-Specific Modeling
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: 69a93f624e7dd4eabf01709f39e62c49
Keywords:
My Notes
--------
June 28, 2021
Learn more about Sirius, Xtext, Acceleo and other Eclipse-based domain-specific modeling tools.
Also: domain-specific languages.
How to Install Java
-------------------
- I installed Java 11 SDK
How to Install Eclipse (for Linux Ubuntu 20.04.2 LTS, 64-bit)
----------------------
- based on my notebook notes for June 1, 2020
Steps:
- install the Eclipse Installer 2020-03 R
- I downloaded eclipse-inst-linux64.tar.gz to Downloads (51.4 MB)
- I unzipped this file to ~/eclipse-installer
- I double-clicked eclipse-inst
- they recommend installing the best basic package for me, and then adding additional features
- install the basic Java package
- I created a Hello World app with a project name: Hello World 2020-03
- this worked
- can later add: Data Tools, C/C++, DSL Xtext, Web/JS, etc.
To Start Eclipse
----------------
cd ~/eclipse/java-2020-03/eclipse
OR double-click "eclipse"
References
----------
() search: eclipse domain specific language
() https://en.wikipedia.org/wiki/Domain-specific_language
() https://en.wikipedia.org/wiki/Xtext
() https://www.eclipse.org/Xtext/index.html
() https://www.eclipse.org/Xtext/documentation/index.html
() https://en.wikipedia.org/wiki/Eclipse_Sirius
() https://www.eclipse.org/acceleo
() https://www.eclipse.org/acceleo/overview.html
() https://wiki.eclipse.org/Acceleo/User_Guide
() https://en.wikipedia.org/wiki/Eclipse_Modeling_Framework
() https://www.eclipse.org/sirius
() https://www.eclipse.org/sirius/download.html
() https://www.eclipse.org/sirius/gallery.html
numerous examples
What Can You Do with Sirius?
Discover concrete examples of modeling tools created with Sirius for various use-cases:
Systems Engineering, Software Development, Business Configuration, etc.
() https://www.obeodesigner.com/en/
Obeo Designer
() https://www.obeodesigner.com/en/white-paper-xtext-sirius
I downloaded the white paper
() https://github.com/eclipse-sirius
() https://www.typefox.io/
Xtext
() https://www.typefox.io/blog/
some interesting looking posts
() http://www.umldesigner.org/
developed using Sirius
() http://www.umldesigner.org/download/
If you already have an Eclipse installed you can install it by using the UML Designer 9.0 update site:
https://s3-eu-west-1.amazonaws.com/obeo-umldesigner-releases/9.0.0/repository/.
() http://www.umldesigner.org/overview/
Welcome to UML Designer by Obeo
UML Designer provides a set of common diagrams to work with UML 2.5 models.
The intent is to provide an easy way to make the transition from UML to domain specific modeling.
This way users can continue to manipulate legacy UML models and start working with DSL.
Users can even re-use the provided representations and work in a total transparence on both UML and DSL models at the same time.
() http://www.umldesigner.org/ref-doc/define-the-application.html#composite-structure-diagram
() https://www.eclipse.org/downloads/packages/release/2021-06/r/eclipse-ide-java-and-dsl-developers
Eclipse IDE for Java and DSL Developers
Package Description
The essential tools for Java and DSL developers, including a Java & Xtend IDE, a DSL Framework (Xtext), a Git client, XML Editor, and Maven integration.
This package includes:
Xtext
Detailed features list
org.eclipse.epp.package.dsl.feature
org.eclipse.epp.package.common.feature
org.eclipse.platform
org.eclipse.epp.mpc
org.eclipse.emf.ecore.xcore.sdk
org.eclipse.emf.mwe2.language.sdk
org.eclipse.emf.sdk
org.eclipse.oomph.setup
org.eclipse.xtext.sdk
org.eclipse.lsp4j.sdk
Maintained by: Xtext Project
() http://melange.inria.fr/
The Melange Language Workbench
Overview
Melange is a language workbench that provides a modular approach for customizing, assembling and integrating multiple domain-specific language (DSL) specifications and implementations.
Melange is tightly integrated with the Eclipse Modeling Framework ecosystem and relies on the Ecore meta-language for the definition of the abstract syntax of DSLs.
Operational semantics is defined using the K3 meta-language in the form of aspects that are statically woven on the language’s syntax.
Designers can thus easily design an interpreter for their DSL in a non-intrusive way.
Melange is bundled as a set of Eclipse plug-ins.
Please refer to the installation instructions for more information.
Full compatibility with other tools of the EMF ecosystem (e.g. Xtext for defining a DSL’s textual syntax, or Sirius for a graphical syntax)
an academic European research project, that seems to be no longer active
but it looks interesting
]]></Notes>
<_-.XholonClass>
<!-- domain objects -->
<PhysicalSystem/>
<Block/>
<Brick/>
<!-- quantities -->
<Height superClass="Quantity"/>
</_-.XholonClass>
<xholonClassDetails>
<Block>
<port name="height" connector="Height"/>
</Block>
</xholonClassDetails>
<PhysicalSystem>
<Block>
<Height>0.1 m</Height>
</Block>
<Brick multiplicity="2"/>
</PhysicalSystem>
<Blockbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var a = 123;
var b = 456;
var c = a * b;
if (console) {
console.log(c);
}
//# sourceURL=Blockbehavior.js
]]></Blockbehavior>
<Heightbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var myHeight, testing;
var beh = {
postConfigure: function() {
testing = Math.floor(Math.random() * 10);
myHeight = this.cnode.parent();
},
act: function() {
myHeight.println(this.toString());
},
toString: function() {
return "testing:" + testing;
}
}
//# sourceURL=Heightbehavior.js
]]></Heightbehavior>
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
$wnd.xh.Brickbehavior = function Brickbehavior() {}
$wnd.xh.Brickbehavior.prototype.postConfigure = function() {
this.brick = this.cnode.parent();
this.iam = " red brick";
};
$wnd.xh.Brickbehavior.prototype.act = function() {
this.brick.println("I am a" + this.iam);
};
//# sourceURL=Brickbehavior.js
]]></Brickbehavior>
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
console.log("I'm another brick behavior");
]]></Brickbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Block</title>
<rect id="PhysicalSystem/Block" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>Height</title>
<rect id="PhysicalSystem/Block/Height" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
</g>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment