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 #612647] Thu, 22 November 2007 10:41
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
Previous Topic:[EMF4Net] Proposal
Next Topic:[Compare] undo/apply with several DiffElement
Goto Forum:
  


Current Time: Sat Jul 27 10:59:44 GMT 2024

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

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

Back to the top