|
|
|
|
|
|
|
|
|
Re: Can i get an XMI model from a DSL textual file? [message #903847 is a reply to message #903771] |
Sun, 26 August 2012 11:34 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Georg,
It's certainly possible to have EMF's tree view populated directly from
the model you parse out of a Xtext serialization. After all, that's
exactly what the reflective editor is doing. The "standard" EMF
properties view can also be supported from that or directly from
selections in source mapped to the model element. As an example, the
Xcore editor supports the exactly properties view you normally get in
EMF's Generator editor and I've written some infrastructure so that when
a command is executed to modify a property value, I convert the result
to annotations in the Xcore source. In your case, if you're directly
editing the model instance derived from the source, you could use the
Xtext serializer to update the source view from the modified serialized
model instance. You definitely don't need and should avoid having two
different serializations of the same model. Best you support direct
model-based editing of the in-memory instance you read from an Xtext
serialization and serialize those changes back to an Xtext
representation to update the source view. Of course this isn't entirely
a trivial exercise but you could have a look at Xcore editor to see how
we do something somewhat similar there. Setting up an EMF command stack
and using a listener as a prompt for updating the source view is the key
idea.
Of course it's not clear if just having an outline view that looks like
EMF's tree view is your goal. That should be possible just by
specializing the outline view.
On 25/08/2012 8:35 PM, Georg Treska wrote:
> Hi Christian,
>
> Maybe you are right, but the point is I need a solution about this
> specific problem,
>
> If you or anyone else in this Forum knows anything about this, or can
> help me with this then I would appreciate it very much!
>
> Best Regards and thank you for Ur help!
>
> Cheers
> Georg
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04743 seconds