Skip to main content
AgeCommit message (Collapse)AuthorFilesLines
2019-09-06Diffs depending on pseudo-conflicts do not reject the other sidelgoubet1-2/+2
When a diff directly or indirectly requires or implies the merging of a diff that is part of a pseudo conflict, it should not require the rejection of the other side's diffs since a pseudo conflict is something that exists in both sides of the comparison. Change-Id: I97c25caf71b128a7bf302ff48c26859cea10a44b
2019-08-30Fix diff, conflict detection and merging of non-unique attributeslgoubet13-2/+759
Non-unique multi-valued attributes had been completely ignored during the conception of EMF Compare and thus every step of the process was failing. Change-Id: I09c7ff8cf3eee5fff6c76128a3142a29acb15987
2019-07-17Fix detection of pseudo conflicts on single-valued attribute changeslgoubet7-4/+124
Pseudo-conflicts on single-valued attribute changes was populated with the origin as the changed value even if the left/right side was non-null. Change-Id: Id225da76bb381a476715c9af9581cd0bc2b9e47a
2019-05-23Merging single-valued containment changes can lead to dangling elements3.3.7M5lgoubet5-0/+203
Change-Id: I122badf27faa6f987a0849e046ff48c595f3c9cd
2017-09-07[518760] Remove legacy JUnit3 artefactsMathieu Cartaud1-21/+0
Bug: 518760 Change-Id: I230f7b853a5f81fd3f9288c7061c51a165a7e0b6
2017-07-06[516524] Use more efficient feature look-up in ReferenceUtilPhilip Langer1-4/+10
ReferenceUtil could make use of an EClass.getFeatureID(feature) which returns -1 if the feature doesn't belong to the class. Only in that case do we need to try to look up the feature by name. Once we've computed the feature ID, we can use it directly to efficiently access the generated reflective methods. This is a replacement of the reverted change 96871, as 96871 has been reverted for an Oxygen release candidate build of EMF Compare. Bug: 516524 Change-Id: I6ff031ebc02dd10bf3b0d88c00f03f15c25cfb62 Signed-off-by: Philip Langer <>
2017-06-27[487151] Accept all non-conflicting changes fails to merge some diffsMartin Fleck6-0/+52
Adapt diff merge computer to only return diffs that actually lead to a conflict in the exception and not all connected diffs to ensure that non-conflicting diffs are merged. Includes tests. Bug: 487151 Change-Id: I3f08e09c3e67066c57d86f572dc66a2d09ca5bb2 Signed-off-by: Martin Fleck <> Signed-off-by: Simon Delisle <> Also-by: Simon Delisle <>
2017-06-27[514415] Relationships between diffs should be cachedMartin Fleck3-7/+428
Add an interface for diff relationship computers that are able to calculate diff relationships and provide two implementations: - Standard implementation replacing MergeDependenciesUtil methods. - Caching implementation keeping the results until invalidated. The computers are usable whenever diff relationships are calculated. Either an explicit instance is provided or the standard implementation is used as fallback: - ComputeDiffsToMerge calculates the order in which diffs are merged. - BatchMerger propagates to ComputeDiffsToMerge. - DependencyData finds required/rejected diffs for selected diffs. The instances are created in two scenarios: - The resource mapping mergers create their own caching instance and invalidate the cache after performing their operation. - The EMF SMV creates its own caching instance for the UI, stored in the EMFCompareConfiguration and invalidates the cache when another comparison is used. Includes tests. Bug: 514415 Change-Id: Id2a56db00b6ca80db2602b3f207377e72a9d80b8 Signed-off-by: Martin Fleck <>
2017-06-06Revert "Use more efficient feature look-up in ReferenceUtil"Laurent Goubet1-10/+4
This reverts commit 888d9a60c302d4519bf01f088d0c22b585cff675. Reverted for security as this is too bug-prone for a RC build. Change-Id: I4a3a949bbb6ddb69db1cc66d8cfd3147acc37272
2017-05-23[516524] Use more efficient feature look-up in ReferenceUtilPhilip Langer1-4/+10
ReferenceUtil could make use of an EClass.getFeatureID(feature) which returns -1 if the feature doesn't belong to the class. Only in that case do we need to try to look up the feature by name. Once we've computed the feature ID, we can use it directly to efficiently access the generated reflective methods. Bug: 516524 Change-Id: I6ff031ebc02dd10bf3b0d88c00f03f15c25cfb61 Signed-off-by: Philip Langer <>
2017-03-14Improve final state and MergeData when mergingLaurent Delaigue3-110/+124
Mergers now properly set the final state of diffs according to whether they were accepted or rejected. We now install a DiffStateAdapter on the comparison and all its diffs to listen to diff state changes and update MergeData accordingly. Change-Id: Ib0945557e4a90feab82280a773ab49237e31c0ce Signed-off-by: Laurent Delaigue <>
2017-02-10Take advantage of multiple type catch of Java 7Philip Langer4-19/+7
Change-Id: I5db80b37aeefa101beaad6515408b54a92342e1b Signed-off-by: Philip Langer <>
2017-02-01[509791] Avoid use of Iterators.emptyIterator()Laurent Delaigue2-7/+6
This method has been removed from guava 19, using JDK-1.7's Collections.emptyIterator() prevents the incompatibility. Bug: 509791 Also-By: Laurent Goubet <> Change-Id: I6751d547dbb5347ec9b6aefb6ca482f2d42b1275
2017-01-24[510704] Add equivalent diffs in same conflictLaurent Delaigue2-2/+97
Bug: 510704 Change-Id: Ib6496b5713c962bcfa34e74e8b526384aef54f77 Signed-off-by: Laurent Delaigue <>
2017-01-24Fix useless TODO markers in different placesLaurent Delaigue1-10/+5
Change-Id: I7fa049035c29e2347eed9dc0fb8bce512908d05a Signed-off-by: Laurent Delaigue <>
2017-01-24Merge test suite 'AtLeastLuna' with 'AllTests'Laurent Delaigue2-67/+6
Since we now only support Luna+ eclipse versions. Change-Id: I795a04002192618b2d7d37aebdb3c180d471f268 Signed-off-by: Laurent Delaigue <>
2017-01-20Merge algorithm refactoringLaurent Delaigue13-760/+1217
In order to address several bugs we faced on merging, a refactoring of the merge algorithm was made. The responsibility of IMerger is reduced to just merging one diff and telling which diffs are required to be merged prior to a given diff and which ones need to be merged in the same 'transaction'. It is now the responsibility of BatchMerger to merge all the necessary diffs in the right order when asked to merge one or several diffs. A new class ComputeDiffsToMerge encapsulates the logic of computing the diffs to merge and in which order. The Graph is no longer used to describe the dependencies between diffs, hence BreadthFirstIterator is no longer used for merging. Refined diffs are considered as 'to be merged in the same transaction' (logically resulting merges). Required diffs must be merged before (merge dependencies). Equivalent and implied diffs are dealt with like before. - Diffs have a new state MERGING to distinguish between an in-progress merge (MERGING) and an already executed merge (MERGED). - Implied merges need to be set to MERGED recursively - Diff ordering for implications needs to be checked recursively - Deterministic refinement order that does not rely on hash values - Simplified, common method for copyLeftToRight and copyRightToLeft Includes tests. Bug: 507177 Bug: 501574 Change-Id: Iad8bad7a4326d4fb297662264b4ad3737f508136 Also-by: Martin Fleck <> Signed-off-by: Laurent Delaigue <>
2017-01-13[508665] Delete EnumerationLiteral classifier changes from comparisonPhilip Langer1-2/+3
EnumerationLiteral.classifier is essentially a derived feature. In fact, the classifier of an EnumerationLiteral is always its containing Enumeration. However, this feature is not declared as such in the metamodel, as it is inherited from InstanceSpecification.classifier, which is not derived. In the UML implementation, EnumerationLiteral.classifier, therefore, overwrites InstanceSpecification.classifier to return an unmodifiable collection always containing the Enumeration instead of a writable collection. Thus, we have to avoid merging changes of EnumerationLiteral.classifier changes and can ignore changes of this feature altogether. Changes of this feature on EnumerationLiterals will therefore be deleted, just as if it would have been the case if the feature would really be declared as derived feature. Bug: 508665 Change-Id: I685e5ab6ef29c3c452845e4f9deae087a9b3b40b Signed-off-by: Philip Langer <>
2017-01-13[483798] Introduce and use context in adapter factoriesMartin Fleck3-2/+349
- Provide context tester for fine-grained selection of adapter factory - Extend extension point with optional context tester - Allow context to be given during creation of adapter factory registry - Fire event on adapter factory change in compare configuration - Add listeners to propagate new adapter factory after context change Includes tests. Bug: 483798 Change-Id: Ib0a1a3538a8cf705ea82620bde625cebfd68636c Signed-off-by: Martin Fleck <> Signed-off-by: Philip Langer <>
2016-10-13[503035] Fix BreadthFirstIterator where some nodes may never be usedMathieu Cartaud1-14/+155
If two nodes on the same level where parent and childs of each other, the breadthFirstIterator will never iterate on them Bug: 503035 Change-Id: Ie1c542a046ace99cde5871cffcd9d00b5ac53a85 Signed-off-by: Mathieu Cartaud <>
2016-10-13[501864] Refactoring of group providers & filtersLaurent Delaigue2-5/+188
Diffs that have no real conflict (direct or indirect) and only some pseudo-conflicts (but also non-conflicting refining diffs) only appear in the side group. Also add javadoc to describe the expected behaviour of the group provider 'by side' and some unit tests for predicates. Change-Id: I3d02172b1c77199ea0904459b196289b19db35d6 Signed-off-by: Laurent Delaigue <>
2016-09-12Add support for additive mergeLaurent Delaigue1-0/+10
* Add a custom ResourceMappingMerger and specific mergers associated (reference merger and conflict merger) * Add a mechanism to select the merger for a diff not only by rank, but also by another criterion, whose semantics is free (IMergeCriterion) Change-Id: Ib32f8430bc58e69e627640efbafecdfae0279f04 Also-by: Mathieu Cartaud <> Signed-off-by: Laurent Delaigue <>
2016-09-12[442897] Fix markers issue in SMVMathieu Cartaud3-25/+33
Some markers of required or rejected diffs don't have the correct color in the gutter. It was previously fixed by review 37012 but this fix finally introduces other problems. This commit reverts this previous fix and adopts the following solution: pseudo conflicts are simply not taken into account when computing merge dependencies since there is nothing to do with them, the changes have already been made on both sides. Change-Id: I554ccb6c3c6617882ba4420bfc3f0cd7f6784f8c Signed-off-by: Mathieu Cartaud <>
2016-07-12Do not consider a container deletion to conflict with unsets under itLaurent Goubet7-98/+148
Since a containment deletion and the "unset"(s) under it were seen as a pseudo conflict with each other, we were "hiding" the deletion from view and preventing the merge altogether. This adds an explicit dependency between the core tests and objenesis to avoid failures when launching the build locally (mockito has a transient dependency to objenesis). Change-Id: I8d00c336285480962499d861575815f1c4b72b3d
2016-07-11Format with mars formatter files forgotten in previous iterationMathieu Cartaud1-1/+2
Change-Id: I27a0a3a6a0b6f11cd44e0c5c2c564cece959eaed Signed-off-by: Mathieu Cartaud <>
2016-06-15Switch to Eclipse mars.2Mathieu Cartaud44-923/+939
Format all non generated classes to get ride of formatter incompatibilities Migrate checkstyle config for checkstyle 6.19 Change-Id: I8c2b31765053a3686de62320f893bedf4ad81d1f Signed-off-by: Mathieu Cartaud <>
2016-06-03Store all file URIs that have initially been in scopePhilip Langer2-1/+64
With this change, we provide access to the originally selected resources in the synchronization model and the comparison scope. This information will allow us to better identify the context of a comparison or merge. Change-Id: I344ed455e77df171143ceb089c6269d207046e31 Signed-off-by: Philip Langer <>
2016-05-31[493650] Fix order of merged childrenLaurent Delaigue4-290/+480
Improved after discussion with Laurent Goubet. A test is added to check that when merging every diff and resolving conflicts by: - first reject all target side conflicting diffs - then accepting all other diffs yields models to be identical on both sides, no matter in what order the diffs are accepted/rejected. The test uses Collections2.permutations, which appeared in guava 12, so an update of the TP was necessary. Bug: 493650 Change-Id: Ib790b992184f6038806bf890f7af96ae2c447ca7 Signed-off-by: Laurent Delaigue <>
2016-05-10[492261] Merge ResourceAttChange in the right resourceMathieu Cartaud9-1/+303
Add test to make sure that diffs linked to a merged RAC are now created in the right resource Bug: 492261 Change-Id: I4de6c63d16add447241c891a22e46c224f819cd3 Signed-off-by: Mathieu Cartaud <>
2016-05-09[493255] Fix scalable conflict detectorLaurent Delaigue7-64/+159
Conflicts and pseudo-conflicts between RAC and other diffs. Need to make sure an RAC represents the deletion of a "dangling" root of a resource to treat it as a containment ref delete. Otherwise it must be dealt with independently from any other type of diff. Bug: 493255 Change-Id: I2b454c8deb8cc3f3a5d47f7062762ded8b634f2c Signed-off-by: Laurent Delaigue <>
2016-04-27[492341] Res Att Change correctly implies diffs3.2.0M7Mathieu Cartaud14-3/+200
Bug: 492341 Change-Id: I44c972aa1aff0d093f9aa5d2a7c7e2967187ce68 Signed-off-by: Mathieu Cartaud <>
2016-02-03[487011] Fix wrong conflict detectionMathieu Cartaud12-2/+231
When comparing two identical models and a different ancestor, some changes lead to real conflicts instead of pseudo-conflicts. Bug: 487011 Change-Id: Ibab0a456eab7833497de24a19c5cd85ff500b207 Signed-off-by: Mathieu Cartaud <>
2016-02-01Scalable conflict detectorMathieu Cartaud1-3/+3
New algorithm searches for conflicts only where it makes sense, which is basically in the same match generally, except for ReferenceChanges, for which an index on values is used. Consequently, the algorithm shrinks from O(n²) to O(n) or maybe O(n log(n)). Change-Id: I021d90dd7a0429116edc071759ee65f2fa06b56c Signed-off-by: Laurent Delaigue <> Signed-off-by: Mathieu Cartaud <>
2016-01-26[485266] Fix merge consequences for delete/move conflictsMathieu Cartaud24-2/+635
Bug: 485266 Change-Id: I29bc1d2d2df58d63aa2fd822c181239643a97f26 Signed-off-by: Mathieu Cartaud <>
2016-01-08[484579] Fix merge consequences algorithmMathieu Cartaud10-1/+484
When computing the consequences of a merge, one must be careful when pseudo-conflict cause diffs from the other side to be merged, since then the leftToRight parameter must be negated to get the relevant consequences for these "opposite side" diffs. Bug: 484579 Change-Id: I34eb80d028068d2b80a59d42fcb3fb9ea9ed0053 Also-by: Laurent Delaigue <> Signed-off-by: Mathieu Cartaud <>
2016-01-05[484557] ResourceAttachment vs Attribute conflictsLaurent Delaigue15-1/+425
Conflicts between ResourceAttachmentChanges and Attribute or FeatureMap changes were not properly detected. Bug: 484557 Change-Id: I06afb3f4141f9194b1314f423282b7df51e66d2e Signed-off-by: Laurent Delaigue <>
2015-12-04[479449] Raise conflict for addition to single-valued containment refPhilip Langer5-2/+113
If there is no value in a single-valued containment reference and a new value is set on both sides, it cannot be merged commutatively. However, EMF Compare did not raise a conflict so far. With this change, a conflict is raised on such changes. A test case is included. Note that I didn't put the predicate ConflictDetectionTest.setOfReference() in EMFComparePredicates in this change to allow for merging this change without breaking the API. I move it into EMFComparePredicates in a subsequent change. Bug: 479449 Change-Id: Ic7d2ea91ca87b0fb47ac0b77db7a87eb78cce5ca Signed-off-by: Philip Langer <>
2015-10-15Extract EMFCompareConfiguration from EMFCompareRCPUIPluginMathieu Cartaud1-16/+17
- Extract graphs from EMFCompareConfiguration - Extract EMFCompareConfiguration from RCPUIPlugin - Give the StructureMergeViewerFilter through the TreeItemAdapterFactorySpec - The new URI Graph instance is now created by EMFCompareRCPPlugin who passes it to the ThreadedModelResolver and holds the associated graph view Change-Id: I713ae5d2f10f1498433cd373d24636e93d3bb4cf Also-by: Laurent Delaigue <> Signed-off-by: Mathieu Cartaud <> Signed-off-by: Laurent Delaigue <>
2015-10-05[478620] Cherry pick operation hangsAlexandra Buzila1-79/+123
Updated the graph tree iterator, so that, in case the graph has cycles, the same node isn't returned twice. Changed name of Graph#treeIterator(E root) method to depthFirstIterator, in order to better reflect its new behavior. Bug: 478620 Change-Id: Ic5096d5060fccb9c6f4ed449225a9d9230c4b57b Signed-off-by: Alexandra Buzila <>
2015-09-29[477767] Introduce new MatchingStrategy for models shared with git3.2.0M2Axel Richard1-3/+0
When a comparison invloves models shared with git, the NameMatchingStrategy is not effective. The strategy should use the entire location for matching instead of name. This strategy must be active only when comparison invloves models shared with git. Change-Id: I27a4b03871845ed1f1e54de4659ebad844dc8e72 Signed-off-by: Axel Richard <>
2015-09-24Manage move of empty papyrus resourcesLaurent Delaigue1-0/+3
This commit introduces a papyrus-specific mechanism to allow empty model resources to be merged simultaneously with non-empty associated resources. This is useful to maintain in sync *.uml, *.notation and *.di files. Change-Id: I7d709981d31046ef73a3feb50da2ae945fac267f Signed-off-by: Laurent Delaigue <>
2015-09-18Remove dependency to rcp in Delaigue8-967/+2
Introduce new test project to do so. Change-Id: I6d487446bd7b78110ab6b742c57496d56d81ca14 Signed-off-by: Laurent Delaigue <>
2015-09-02[475401] Add three-way tests for RootIDMatchingStrategyStefan Dirix56-0/+830
Add three-way tests for RootIDMatchingStrategy. Tests include intersections on each resource side or with multiple nodes and left-right matching via an origin resource. Bug: 475401 Signed-off-by: Stefan Dirix <> Change-Id: I536e2bb52330e94e272103cf28e636e1ecc7ce1c
2015-09-02[475401] Modify RootIDMatchingStrategy to only return unique mappingsStefan Dirix27-1/+422
The RootIDMatchingStrategy determines matching between resources by intersecting the IDs of their root objects. The RootIDMatchingStrategy now checks if a possible mapping is unique and does therefore not intersect with another possible mapping. The previous behavior of returning the first possible mapping creates "random" results, affected by the order the given iterators return their resources. Since this strategy can not determine which is the "better" mapping of multiple options it should not return any of them. This way the remaining EMFCompareFramework is not confused by "half-true" mappings. Includes two-way testcases. Bug: 475401 Signed-off-by: Stefan Dirix <> Change-Id: I2cb886d088d6ce27cbc06ec2958fc02ef9253d36
2015-07-31Only mark conflicting files as conflicting instead of the whole modelLaurent Goubet1-0/+179
Change-Id: Id5d77732ad88977ffefb3224fc2cc507713b082d
2015-06-10[469237] Merge Refining diffs if all refined diffs have been mergedAxel Richard2-1/+89
If a diff refines another, we have to check if the "macro" diff has to be merged with it. Also add test case. Bug: 469237 Change-Id: Ieb6cf681c7f6e0255eb061da9b69605a513aa655 Signed-off-by: Axel Richard <>
2015-05-28[467576] Correct Handling of Proxies in ReqEngineMichael Borkowski2-2/+100
MatchUtil so far did not handle proxy objects correctly, which led to false negatives in detecting required diffs, which was exposed in bug 467576. This change fixes this issue by comparing the objects' URIs to detect proxy matches. Bug: 467576 Change-Id: Ib390ddbd56e65145ecd554535d960e769c728a29 Signed-off-by: Michael Borkowski <>
2015-05-13[458971] Fix infinite loop in Graph.BreadthFirstIterator#prune()Axel Richard1-0/+27
Bug: 458971 Change-Id: I1134d05a996d1f1a80cac27829250e6e9b732d02 Signed-off-by: Axel Richard <>
2015-03-17[461224] Fix NoSuchElementException in Graph.Axel Richard1-0/+56
Also add test case to reproduce the problem. Bug: 461224 Change-Id: I15b287997f96ea6b2c9516040a3a45c91c08a6ba Signed-off-by: Axel Richard <>
2015-03-17[462203] Child match appear as top-level match.Axel Richard2-1/+114
Reorganize matches in IdentifierEObjectMatcher class to avoid root matches that are actually child matches. Bug: 462203 Change-Id: I0045b96cbf7805c3e7e19f6e2fa4ed3bb6085c85 Signed-off-by: Axel Richard <>

Back to the top