Model meta elements and their instances? [message #1808656] |
Fri, 28 June 2019 05:06  |
Eclipse User |
|
|
|
Hi there,
for an UI, I want to model the screen configuration within my DSL as well as their instances. It should be possible to describe the UI configuration options and create concrete instances.
E.g. Editors should contain different attributes which could be optional/mandatory and so on. Instances of specific editors need to set all mandatory attributes.
When I add all possible Editors and their attributes in the xtext DSL, I would know how to implement this. But with the editors as part of the concrete files, I'm lost.
Is this possible? Could you please give me some hints, how achive this? Thank you!
Greetings,
Matthias
|
|
|
|
|
Re: Model meta elements and their instances? [message #1809927 is a reply to message #1808656] |
Thu, 25 July 2019 14:48   |
Eclipse User |
|
|
|
Hey, sorry for the late reply and sorry for my bad explanation.
I plan an UI platform with several different Views. Every view needs different properties, different widgets, content, variables to edit etc. About 10 different view types.
Now, as I see it, I could describe every particular view with it's properties in the DSL, so that I can create concrete UI menus in the .mydsl file.
However I'm interested if I can do it a step more abstract, so that the DSL does know there can be different views with possible properties (widgets), but it shall not define the actual combinations.
That way someone should be able to 1. Describe in the .mydsl file, what views are actually possible (e.g. "numeric editor" with one property "Variable" to edit) and afterwards 2. State that there are 10 actual numeric editor instances, editing variables a, b, c, ... Another customer might want to model an editor with three variables and only 2 actual instances.
"View" name=ID
"NumericEditor" is a View
"TemperatureSetpoint" is NumericEditor
"Brightness" is NumericEditor
If this approach is way to complicated, just say so.
I hope I explained it more clear this time. As I see it, part 1. Would be the meta model and 2. The model. And normally the DSL is the meta model and the .mydsl file is the concrete model?
Btw, what are the .mydsl files called? DSL instances?
Thank you very much for your patience and time!
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04017 seconds