|Re: Using xText with existing model and Resource [message #995916 is a reply to message #995610]
||Mon, 31 December 2012 09:03
| Henrik Lindberg
Registered: July 2009
On 2012-30-12 18:03, Ashwani Kr Sharma wrote:|
> I currently found a way that i will load the xmi of existing model
> (using XMIResource) and take the EOBject and move it to another
> XTextResource. If i save XTextResource it persists it as DSL format. Now
> on each save of XTextResource i have to sync its content to the xmi file.
> I have no option to create another file for DSL format and keep its
> content in sync with xmi format.
> What do you guys feel about this approach ?
> Ashwani Kr Sharma
That approach works.
You can use the builder framework and "build" the XMI version from the
DSL version. What you want to do depends on how you want to handle
conflicts - both files edited etc. Or if you want to make the DSL the
master if one exists and always overwrite the XMI.
With the builder framework you do not have to keep track of resources as
they change (there are many ways resources can change besides saving it
in an editor).
Hope that helps.
Powered by FUDForum
. Page generated in 0.05908 seconds