[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: Apply EMF Compare Diffs in command stack

Hi Wayne,

The main problem here is that we currently have multiple ResourceSet when comparing (one for the left model, one for the right, ... and one for the ancestor if it exists). We are trying to find a way to use an editing domain, but AFAIK it only provides a single editing domain and we cannot cope with this.

Any idea is welcome.

Laurent Goubet
Obeo

Wayne Beaton a écrit :
I'm using EMF Compare to compare a local instance of a model taken directly from a live editor against an instance pulled from an XML file obtained via web service.

Basically, the user selects "compare against server" from within an open editor. I take the model from the editor, and clone it. I send the clone (left) along with the instance obtained from the server (right) and open a Compare Dialog.

I can successfully use the compare dialog to update the left model (I've turned off updates to the right). When the user clicks okay, I take the modified clone and compare it against the instance sitting live in the editor and then apply the diffs against the live instance.

The problem is that those applied diffs are not done through the command stack and so they are not undoable. While the changes do appear in the editor, the editor is not marked dirty.

So... what I think I'm looking for is some way to apply those diffs via the command stack.

Or, am I just doing this wrong?

I can't seem to Google a solution to this. Any pointer would be appreciated.

Thanks,

Wayne

begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr/";>Obeo</a>
email;internet:laurent.goubet@xxxxxxx
url:http://www.obeo.fr
version:2.1
end:vcard