|Best organisation to manipulate textual and graphical representation of a model [message #1015587]
||Fri, 01 March 2013 09:57
| Victor Noël
Registered: June 2010
We have a fearly complex language (for describing component-based architectures) and we would like to have a textual and graphical representation.
Currently I took care of the textual representation using xtext and ecore generation from the grammar, but now that we want to add a graphical representation, I'm wondering what is the best way to realise that in order to have instances of the language to be interchangeably editable with the graphical and the textual editor as well as code generation for these instances.
Without entering into detail, we have component classes that refer to each other.
And since there could be several components declared by file (as with Scala, not like Xtend or Java), I was at first planning to define an ecore model defining component classes, and then in the textual grammar, introduce the concept of file, namespaces, imports, etc... and do the same for the graphical editor.
I wanted to do that because the graphical grammar WILL be different than the textual grammar!
But the problem with that is that the edited textual model won't be editable with the graphical editor and that we would need two generator, one per representation (even if I can factorise the common parts obviously).
So my question is: what is the best way to do what I want, while keeping the opportunity to have different grammar for the textual and graphical representation? I'm not sure I will be able to define a grammar with xtext that will only relies on a representation-agnostic meta-model...
Thank you for any help, I hope my explanations are clear :)
Powered by FUDForum
. Page generated in 0.22271 seconds