How to add default to a property in a concept

This post assumes that you have an MPS with mbeddr preloaded.

Go to the constraints aspect for the concept you want to add a default to a property:

hdp-01

Create a new constraint for this concept:

hdp-02

Press Ctrl+L and import the language com.mbeddr.mpsutil.propertydefault:

hdp-03

hdp-04

Go to the property constraints and press Enter to make a new one:

hdp-05

Choose the property to which you want to apply a default value:

hdp-06

Select the entire constraint by pressing ctrl + uparrow twice:

hdp-07

Press Ctrl + Space and choose default to convert the constraint to a default specification:

hdp-08

Choose your default value:

hdp-09

If you now make an instance of MyConcept, you will automatically get the myProperty filled in with the default value:

hdp-10

 

First pre-release of mps-textgen-multilanguage plugin

This plugin enables you to use the standard template mechanism of MPS (node macros, loop macros, property macros, etc.) to generate free text. So if you have some custom text format you want to generate to, you will have a more easy and useful mechanism than the standard MPS textgen.

Please see the mps-textgen-multilanguage github page for more details.

Download: mps-textgen-multilanguage first release tag.

Where are mbeddr builds located?

Go to the mbeddr build page.

Login as guest (username: “guest”, password: “guest”) and then go to Build –> the plugin you want to download (e.g. sl-all) –> branch you want to download from.

Then choose Latest successful build –> Artifacts –> Download all (zip)

See picture below for the example of the sl-all plugin

mps-sl-all-download-mbeddr-build

 

Welcome to DSLFoundry!

Here we create and collect tools and libraries for Domain Specific Languages (also see about). You can see these on our projects page.

In addition, we will post some handy tips about DSL tools now and then in the posts further down this blog.

Please feel free to reuse our code and if you find bugs, please let us know via one of the github issue trackers. And of course you are welcome to contribute if you have any additions or enhancements.