Skip to main content
summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-05-23Merging single-valued containment changes can lead to dangling elements3.3.7M5lgoubet5-0/+203
Change-Id: I122badf27faa6f987a0849e046ff48c595f3c9cd
2018-06-22bump versionslgoubet2-2/+2
Change-Id: I63a4c3db4101430f622814e4be23746c2c2e1cb4
2018-01-30Bump plugin and feature versions for Photon3.3.3M5lgoubet2-2/+2
Change-Id: Ia16da9144a488ccd63ff4d83738b445cc82ff4c6
2017-09-07[518760] Remove legacy JUnit3 artefactsMathieu Cartaud1-21/+0
Bug: 518760 Change-Id: I230f7b853a5f81fd3f9288c7061c51a165a7e0b6
2017-08-23Bumping versions for Oxygen.13.3.2RC1Laurent Goubet2-2/+2
Change-Id: I9c994b3e0e7f661741cbe2005c6039a61b385f36
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 <planger@eclipsesource.com>
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 <mfleck@eclipsesource.com> Signed-off-by: Simon Delisle <simon.delisle@ericsson.com> Also-by: Simon Delisle <simon.delisle@ericsson.com>
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 <mfleck@eclipsesource.com>
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 <planger@eclipsesource.com>
2017-05-11Compatibility with guava 21Laurent Goubet1-3/+3
- Objects.ToStringHelper has been moved to MoreObjects. We now reimplement the functionality in order to be compatible with both guava 15 and guava 21 - com.google.common.base.Predicate now extends java.util.Function.Predicate. As a result static imports of "and" and "or" from Predicates are shadowed by java.util.function.Predicate variants, preventing the statics from being called unless explicitely qualified. Change-Id: Ie33d5eedd9e1a6dbea8f4af2db9aa36ec8567cf5
2017-04-07Bump versions for EMF Compare 3.3.1Laurent Goubet2-2/+2
Change-Id: Iabc80b8657f790bf7702d1dc36ee6f6202e1ee09
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 <laurent.delaigue@obeo.fr>
2017-02-10Take advantage of multiple type catch of Java 7Philip Langer4-19/+7
Change-Id: I5db80b37aeefa101beaad6515408b54a92342e1b Signed-off-by: Philip Langer <planger@eclipsesource.com>
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 <laurent.goubet@obeo.fr> 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 <laurent.delaigue@obeo.fr>
2017-01-24Depend on JDK-7Laurent Delaigue3-8/+18
Change-Id: Ica2dbe31ebbafed7c52134258afc4b4b834464af Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
2017-01-24Fix useless TODO markers in different placesLaurent Delaigue1-10/+5
Change-Id: I7fa049035c29e2347eed9dc0fb8bce512908d05a Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
2017-01-24Merge test suite 'AtLeastLuna' with 'AllTests'Laurent Delaigue3-68/+6
Since we now only support Luna+ eclipse versions. Change-Id: I795a04002192618b2d7d37aebdb3c180d471f268 Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
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 <mfleck@eclipsesource.com> Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
2017-01-13[508665] Delete EnumerationLiteral classifier changes from comparisonPhilip Langer2-2/+134
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 <planger@eclipsesource.com>
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 <mfleck@eclipsesource.com> Signed-off-by: Philip Langer <planger@eclipsesource.com>
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 <mathieu.cartaud@obeo.fr>
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 <laurent.delaigue@obeo.fr>
2016-09-14Bump versions for EMF Compare 3.3.0Laurent Goubet2-2/+2
Change-Id: If58253d9e062b447173cb5a6ed26afe953a364f9 Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr> Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr>
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 <mathieu.cartaud@obeo.fr> Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
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 <mathieu.cartaud@obeo.fr>
2016-07-12Do not consider a container deletion to conflict with unsets under itLaurent Goubet8-99/+150
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 <mathieu.cartaud@obeo.fr>
2016-06-15Switch to Eclipse mars.2Mathieu Cartaud47-925/+962
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 <mathieu.cartaud@obeo.fr>
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 <planger@eclipsesource.com>
2016-05-31[493650] Fix order of merged childrenLaurent Delaigue5-293/+483
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 <laurent.delaigue@obeo.fr>
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 <mathieu.cartaud@obeo.fr>
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 <laurent.delaigue@obeo.fr>
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 <mathieu.cartaud@obeo.fr>
2016-02-09Reactivate org.eclipse.emf.compare.tests test suite Mathieu Cartaud1-6/+23
Change-Id: I2100cd45cbc5c095b379e574a2644b11f3b7112c Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
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 <mathieu.cartaud@obeo.fr>
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 <laurent.delaigue@obeo.fr> Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
2016-01-27Add missing test suite for Neon buildMathieu Cartaud1-0/+16
The added test suite is used only for versions posterior to Eclipse Luna Change-Id: I16d39252ac14286f31f67b2a96d722f714080705 Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
2016-01-26[485266] Fix merge consequences for delete/move conflictsMathieu Cartaud24-2/+635
Bug: 485266 Change-Id: I29bc1d2d2df58d63aa2fd822c181239643a97f26 Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
2016-01-08[484579] Fix merge consequences algorithmMathieu Cartaud11-1/+519
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 <laurent.delaigue@obeo.fr> Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
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 <laurent.delaigue@obeo.fr>
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 <planger@eclipsesource.com>
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 <laurent.delaigue@obeo.fr> Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr> Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
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 <abuzila@eclipsesource.com>
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 <axel.richard@obeo.fr>
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 <laurent.delaigue@obeo.fr>
2015-09-18Remove dependency to rcp in emf.compare.testsLaurent Delaigue9-968/+2
Introduce new test project to do so. Change-Id: I6d487446bd7b78110ab6b742c57496d56d81ca14 Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
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 <sdirix@eclipsesource.com> 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 <sdirix@eclipsesource.com> Change-Id: I2cb886d088d6ce27cbc06ec2958fc02ef9253d36

Back to the top