Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Best organisation to manipulate textual and graphical representation of a model
Best organisation to manipulate textual and graphical representation of a model [message #1015587] Fri, 01 March 2013 09:57
Victor Noël is currently offline Victor Noël
Messages: 112
Registered: June 2010
Senior Member
Hi,

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 :)
Previous Topic:Xtext Grammar
Next Topic:Eclipse 4.2.1 stuck for long time on "writing new resource descriptions"
Goto Forum:
  


Current Time: Sun Sep 21 22:31:16 GMT 2014

Powered by FUDForum. Page generated in 0.01672 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software