Home » Modeling » EMF » EMF <-> Source XML Synchronization
EMF <-> Source XML Synchronization [message #506210] |
Wed, 06 January 2010 10:01 |
|
Hi,
I have a use case where the tool I am developing has a multi-paged editor
with two tabs : Design and Source.
Design Tab allows modification of my model using UI and Source Tab allows
modification via directly changing the persisted XML.
Is there any way to achieve synchronization between these 2 tabs, such
that if I change the model in the design tab the change reflects in the source
tab and vice versa.
I did find some postings on this, nevertheless, could not get the right way of doing this.
Inface I also tried the EMF2DOMSSEAdapter to achieve this, but would rather not use
internal APIs.
Please do suggest me an elegant way of doing this. Is there any example I can refer
to.
Thanks a lot,
Nidhi
|
|
|
Re: EMF <-> Source XML Synchronization [message #506217 is a reply to message #506210] |
Wed, 06 January 2010 15:18 |
Ed Merks Messages: 33136 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------030004000405080003030202
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Nidhi,
The SSE DOM with adapters is the best approach available I think, though
Cameron Bateman's approach looks very promising.
https://www.eclipsecon.org/submissions/2010/view_talk.php?id =1419
Nidhi wrote:
> Hi,
>
> I have a use case where the tool I am developing has a multi-paged editor
> with two tabs : Design and Source.
>
> Design Tab allows modification of my model using UI and Source Tab allows
> modification via directly changing the persisted XML.
>
> Is there any way to achieve synchronization between these 2 tabs, such
> that if I change the model in the design tab the change reflects in
> the source
> tab and vice versa.
>
> I did find some postings on this, nevertheless, could not get the
> right way of doing this.
> Inface I also tried the EMF2DOMSSEAdapter to achieve this, but would
> rather not use
> internal APIs.
>
> Please do suggest me an elegant way of doing this. Is there any
> example I can refer to.
>
> Thanks a lot,
> Nidhi
--------------030004000405080003030202
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Nidhi,<br>
<br>
The SSE DOM with adapters is the best approach available I think,
though Cameron Bateman's approach looks very promising.<br>
<blockquote><a
href=" https://www.eclipsecon.org/submissions/2010/view_talk.php?id =1419"> https://www.eclipsecon.org/submissions/2010/view_talk.php?id =1419</a></blockquote>
<br>
Nidhi wrote:
<blockquote cite="mid:hi28hd$u7o$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I have a use case where the tool I am developing has a multi-paged
editor
<br>
with two tabs : Design and Source.
<br>
<br>
Design Tab allows modification of my model using UI and Source Tab
allows
<br>
modification via directly changing the persisted XML.
<br>
<br>
Is there any way to achieve synchronization between these 2 tabs, such
that if I change the model in the design tab the change reflects in the
source
<br>
tab and vice versa.
<br>
<br>
I did find some postings on this, nevertheless, could not get the right
way of doing this.
<br>
Inface I also tried the EMF2DOMSSEAdapter to achieve this, but would
rather not use
<br>
internal APIs.
<br>
<br>
Please do suggest me an elegant way of doing this. Is there any example
I can refer to.
<br>
<br>
Thanks a lot,
<br>
Nidhi
<br>
</blockquote>
</body>
</html>
--------------030004000405080003030202--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: EMF <-> Source XML Synchronization [message #506253 is a reply to message #506217] |
Wed, 06 January 2010 12:14 |
|
Hi Ed,
> The SSE DOM with adapters is the best approach available I think, though
The EMF2DOMAdapter requires a Translator. The problem is that the metamodel (XSD) for the tool is quiet big and that too it is subjective to change without my control over it (comes from an external source).
Creating a translator for each structural feature might not be that scalable.
I tried recursing through the features generically to create translators, but this does not seem to be stable.
Am I doing something wrong here?
>Cameron Bateman's approach looks very promising.
> https://www.eclipsecon.org/submissions/2010/view_talk.php?id =1419
I'd look forward for the session to be uploaded, meanwhile would try to dig in.
Thanks,
Nidhi
|
|
| | | | | | |
Goto Forum:
Current Time: Thu Apr 18 23:32:06 GMT 2024
Powered by FUDForum. Page generated in 0.02185 seconds
|