Community
Participate
Working Groups
Build Identifier: I20100608-0911 Follow steps to reproduce. I suspect that the exception has sth. to do with the annotations at the EPackages of the 'A' models. If the annotation will be removed before merging the two models the exception won't happen. By the way, I don't understand the changes on the annotations? The annotations are absolutely identical. Reproducible: Always Steps to Reproduce: 1. Import attached project 2. Select Ecore file A1 and A2 3. Choose 'Compare With -> Each Other' from context menu 4. Choose 'Selected resource(s) only' from the 'Match Model Selection' dialog 5. Select the change on the attribute under the EClass Clazz 6. Perform 'Copy Current Change from right to left -> NPE in ModelElementChangeRightTargetMerger.applyInOrigin(...), see attached trace
Created attachment 180963 [details] Project with models to reproduce this bug
Created attachment 180965 [details] Detailed stack trace showing the NPE
After removing the annotations in the 'A' models (see attached project) I was able to compare and merge the attribute. Sadly, I can't save the result because of another NPE. This time in ModelContentMergeViewer.getContents(...), see attached trace2.txt. Decided to increase importance. Due to this bugs emf compare is unusable. Using EMF Compare SDK 1.1.1.v201009150438 from the Helios update site.
Created attachment 180971 [details] Second NPE occurred on save
Created attachment 180992 [details] Yet anoter NPE Got another NPE while trying to perform a merge programatically. java.lang.NullPointerException at org.eclipse.emf.compare.diff.internal.merge.impl.ModelElementChangeLeftTargetMerger.undoInTarget(ModelElementChangeLeftTargetMerger.java:98) at org.eclipse.emf.compare.diff.merge.service.MergeService.doMerge(MergeService.java:166)
The NPEs outlined here have been fixed, the fix will be available in 1.2.0M6. As for the problem with your annotations being detected as modified, it is due to you selecting "Selected resource(s) only" in your step 4 (when comparing). Your annotations contain links to another model, and thus they won't be matched if you're not considering the whole resource set for the comparison. The NPE when saving has not been reproduced, considered fixed until someone reproduces it and provides us with reproduction steps.