Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » xTextEditor to xmi serialization
xTextEditor to xmi serialization [message #1011016] Mon, 18 February 2013 17:15 Go to next message
Ashwani Kr Sharma is currently offline Ashwani Kr SharmaFriend
Messages: 118
Registered: July 2009
Location: Bangalore, India
Senior Member

Hi,

I am able to serialize a xmi to dsl format using xTextResource.
This thread was very useful there: http://www.eclipse.org/forums/index.php/mv/msg/382898/921393/#msg_921393

My DSL hides many attributes from xmi.
1) User will open xmi file and i will create another temp file (dsl) and open XTextEditor for it.
2) User will edit the DSL and save i want to update the xmi file back.

I am kinda of able to achieve 1. How can I achieve 2nd ?

Regards,
Ashwani Kr Sharma
Re: xTextEditor to xmi serialization [message #1011273 is a reply to message #1011016] Tue, 19 February 2013 08:04 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 658
Registered: July 2009
Senior Member
You have to implement this yourself, and it's going to be tough.

We call this procedure roundtrip engineering, and it as proven to be a
bad idea most of the times. The main reason is that the two models have
different levels of abstraction. You somehow have to add information out
of nowhere inside the transformation from Xtext -> XMI. A colleague has
compared this once with trying to get a pig from a sausage.

If you want to do it anyway, interesting topics to dig into could be
finding stable IDs for EObjects on each side, model-to-model
transformations, model compare etc.

Am 18.02.13 18:15, schrieb Ashwani Kr Sharma:
> Hi,
>
> I am able to serialize a xmi to dsl format using xTextResource. This
> thread was very useful there:
> http://www.eclipse.org/forums/index.php/mv/msg/382898/921393/#msg_921393
>
> My DSL hides many attributes from xmi.
> 1) User will open xmi file and i will create another temp file (dsl) and
> open XTextEditor for it. 2) User will edit the DSL and save i want to
> update the xmi file back.
>
> I am kinda of able to achieve 1. How can I achieve 2nd ?
>
> Regards,
> Ashwani Kr Sharma
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: xTextEditor to xmi serialization [message #1011275 is a reply to message #1011273] Tue, 19 February 2013 08:13 Go to previous message
Ashwani Kr Sharma is currently offline Ashwani Kr SharmaFriend
Messages: 118
Registered: July 2009
Location: Bangalore, India
Senior Member

Hi,

I tried EMF compare and go list of differences. Parsing the differences and applying it on model from\for xmi is quite tedious.

Could there be any alternative to the approach which i have currently ?

Regards,
Ashwani Kr Sharma
Previous Topic:Grammar Mixins
Next Topic:Cross referencing - Fake Resource Set
Goto Forum:
  


Current Time: Sun Dec 21 13:37:12 GMT 2014

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

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