Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Compare] undo/apply with several DiffElement
[Compare] undo/apply with several DiffElement [message #103548] Thu, 22 November 2007 10:41 Go to next message
Eclipse UserFriend
Originally posted by: firstname.name.gmail.com

Hey,

I am using compare for a project. I have to apply/undo several DiffElement. To
do that, I collect all the elements of a diffModel, if this element is a
DiffElement and not a DiffGroup, then I call the merger:

for(TreeIterator<EObject> iterator=diffModel.eAllContents();iterator.hasNext();){
eObject = iterator.next();
if ((eObject instanceof DiffElement) && !(eObject instanceof DiffGroup)){
merger = MergeFactoryCopy.createMerger((DiffElement) eObject);
merger.applyInOrigin();
}
}

I have some problems with values of a reference that have changed to a an added
element. When I debug it, I can see that the value is changed to element A, but
next, element A is removed, and a copy of element A is added. Reference is then
lost...

BTW:

1. I had to modify the merger. Is it possible to consider the package
org.eclipse.emf.compare.diff.generic.merge.impl as an exported one.
2. I did certainly something wrong, but I also modified
removeDanglingReferences() to make sure that the feature to remove is not an
instance of InternalEList.Unsettable (for instance a derived union)

thanks.


--
F. Lagarde
Re: [Compare] undo/apply with several DiffElement [message #103566 is a reply to message #103548] Thu, 22 November 2007 11:10 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1886
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050907090009050606010200
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Fran
Re: [Compare] undo/apply with several DiffElement [message #612648 is a reply to message #103548] Thu, 22 November 2007 11:10 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1886
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050907090009050606010200
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Fran
Previous Topic:[Compare] undo/apply with several DiffElement
Next Topic:[Teneo] Build update
Goto Forum:
  


Current Time: Sat Sep 19 16:46:06 GMT 2020

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

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

Back to the top