Skip to main content
AgeCommit message (Collapse)AuthorFilesLines
2017-06-27[514415] Relationships between diffs should be cachedMartin Fleck1-0/+420
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 <>
2016-06-15Switch to Eclipse mars.2Mathieu Cartaud4-30/+32
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 <>
2015-03-09[457652] Give xmi:ids higher priority than attribute idsStefan Dirix2-6/+6
The IdentifierEObjectMatcher will now give xmi:ids priority over attribute ids to prevent models with duplicate xmi:ids. Includes testcases. Bug: 457652 Signed-off-by: Stefan Dirix <> Change-Id: Ia3ba4222837ecc7f6a17bccc3973ecaee334fad0
2015-01-21[456860] Improve handling of equivalent three-way text changesPhilip Langer1-13/+303
Three-way diffing and patching is not supported by google diff match patch (dmp) and simply applying the patch computed by dmp to the opposite side, as we did before, would cause the equivalent changes to be applied twice. Therefore, we had to re-implement the detection and merging ourselves to support the handling of equivalent changes. We also adapted the test cases and the implementation of the three-way diff and merge to correspond to the behavior of the line differencing and introduced a determination of the currently used line separator in the text, which is now also used when building the merged version. Bug: 456860 Change-Id: I12be9c68eda663e0206c9f230a9faf9631be3275 Signed-off-by: Philip Langer <>
2014-11-17[450949] Avoid shortcuts in DefaultDiffEngine for certain FeatureMapsStefan Dirix4-0/+143
Changes in FeatureMaps should be merged via FeatureMapChanges in the FeatureMapChangeMerger. In cases of added / removed elements the DefaultDiffEngine prevents the calculation of required FeatureMapChanges since they only affect attributes of those elements. This leads to ordering problems since the ReferenceChangeMerger can not handle FeatureMaps properly. This fix removes the calculation prevention for these cases. Includes testcases for this issue. Bug: 450949 Signed-off-by: Stefan Dirix <> Change-Id: Ie21a54c2e08b27bcc421f1c28d42e542407b990d
2014-10-27[446947] Adds support for three-way merging multi-line String attributesPhilip Langer1-0/+449
Changes applied to String attributes, which might for instance contain multiple lines of code in a model (e.g., OpaqueBehaviors in UML), will now be checked whether concurrent changes in the context of a three-way diff are mergeable using a three-way line-based merge algorithm. If yes, no conflict will be raised and they will be merged line by line. Therefore, this commit introduces a copy of the diff_match_patch class R106 and a ThreeWayTextDiff utility, which extends the capabilities of diff_match_patch to support three-way diffing and merging of text (as opposed to two-way diffing only). Bug: 446947 CQ: 8824 Change-Id: Ifc7a3144461f7d47750b90a8098d565279ee826d Signed-off-by: Philip Langer <>
2014-10-08Optimize dice coefficient storing bigrams within intsLaurent Goubet1-0/+21
Bigrams are a combination of two char objects, which are stored on 16 bits. We can take advantage of that and store them within ints instead, allowing us to use simple arithemtics instead of String comparison to compare the bigrams together, making the whole dice coefficient computation faster in turn. Change-Id: I532f02cfc1505b5722f3c757c1e933461d1df383
2014-10-08Consider potential duplicates in String similarityLaurent Goubet1-4/+42
We need to ensure that "aaa" is never considered to be equal to "aaaa". The previous unit tests were failing to notice the logic error since we were only comparing "aa" and "aaaa"... whereas "aa" is less than or equal to two characters long, falling into a special case within DiffUtils. Bug: 444712 Change-Id: I0e81e58eadc288f5a79daac75e245f33ca655119
2014-09-25[443031] Fix NPE on FeatureFilter.referenceIsSetAxel Richard4-0/+170
Fix NPE on FeatureFilter.referenceIsSet Add tests Bug: 443031 Change-Id: Id2ecebcff6c174341199451d472aad4c06101239 Signed-off-by: Axel Richard <>
2014-08-13Do not use assertSame for int comparison (2)Mikaël Barbero2-51/+50
Change-Id: Iae5a6278c36b3d9a382695012546e208403e2ec0
2014-08-13Do not use assertSame for int comparisonMikaël Barbero2-13/+15
Change-Id: Ia66b0f5d243f33e5aca11f807f4c13359e276a09
2014-05-21[435376] Conflicted subdiffs shouldn't be merged when CascadingFilter isAxel Richard1-3/+3
active Bug: 435376 Change-Id: I54681d8fd72643a6454f1d4d810e4d35ef006d30
2014-03-25[406439] EMF Compare does not support list with null valuesAxel Richard1-0/+24
Nulls are a valid value of the attribute lists. Change ImmutableList.copyOf() for Collections.unmodifiableList(). Add new test case in DiffUtilTest to test null values. Bug: 406439 Change-Id: Ic75f8d87f00d896529a18d807a9451569c53a100
2014-03-13normalize EOLs in the core (first pass)Laurent Goubet3-439/+439
Change-Id: Id5b351cc3c89777401f672c85abb46560ee461b3
2014-01-30Cleanup for version bumpingLaurent Goubet2-10/+13
- Bump versions to reflect minimal BREE change - Fix as many warnings as possible - Make sure our @since reflect the correct versions Change-Id: Ifb30b655f17ef2420ea5ca69c528910bd51e7649
2013-06-21Filling of the implication link with UML subsets.Cedric Notot2-99/+122
Like equivalences, the merge of a difference may imply the merge of other ones. But, contrary to equivalences, this implication link is unidirectional. So, if A implies B, B does not imply A. In the context of UML, references can be defined as subset of other ones. So, the merge of the add of a reference which is subset of another one implies the add of this last one. In the same way, the delete of a reference which is superset of other ones implies the delete of these last ones. Note that some superset references can be defined as 'union' (that is to say that each superset reference is in one of the subsets). Union supersets are derived, so they are not managed by EMF Compare. The implications are set in Diff#implies and Diff#impliedBy. The reference merger of EMF Compare scans these links to mark as merged the impacted differences without merging them (because the merge itself will be managed by the 'meta-model'). Change-Id: If3a62076c3569b1ba0aa4628c657765cd8ad7711
2013-06-19Deprecate use of EMFCompare#createDefaultScope(...)Laurent Goubet2-5/+7
Change-Id: Ie4af0c2180a6df04bad8edeba038e6dd1141cf63
2013-03-18Fix chocolate commitcbrun2-245/+0
2013-03-15Test infrastructure for validating diff detection using Change.ecorecbrun2-0/+245
2013-03-11remove unused and deprecated EMFCompareConfigurationMikaël Barbero1-1/+0
2013-03-11[402536] Merge sub diffs when filter "Sub diffs elements" is active.Axel Richard1-513/+609
When the filter "Sub diff elements" is active, the sub diffs are hidden. So, when we merge a diff, if this diff contains sub diffs, these sub diffs should also merged. Moreover, these sub diffs are maybe required by or requires diffs. These diffs may contain sub diffs that should also be merged. Bug: 402536 Change-Id: Ibec057bb9ab43f0484a1fcf317b9c0c59a95446e
2013-02-25Ignore the "time out" tests : the build machine is much too slow.Laurent Goubet1-3/+13
We might want to create a dedicated test suite for the build machine...
2013-02-11[400221] More extensible mergers... and use extensions for requirementsLaurent Goubet1-8/+21
We've made the mergers extensible through bug 398863... but we do not make use of these extensions when merging other diffs from within the merging process (merging requires/requiredBy, merging equivalences...). This patch transforms the merger mechanism to make sure we always use the extensions instead of Diff.copyRightToLeft or Diff.copyLeftToRight; and depreciates these two methods. All of the merging code has been moved to three new specific mergers that will be easier to extend. These three 'default' mergers are provided through the 'mergerExtension' extension point which has been moved to the o.e.c.ide plugin. This also changes all tests so that they use the new APIs instead of the Diff.copy* methods. Bug: 400221 Change-Id: I41bb9ab74001e0c94ecb26ffec88cecf599a67be
2013-02-04Raise the timeout to 60sec for Eclipse Hudson afterMikaël Barbero1-1/+2
2013-01-31Raising timeout so that hudson can get this done within the limits.Laurent Goubet1-7/+10
2013-01-30[399361] Adding performance tests for the LCSLaurent Goubet1-0/+133
2013-01-08394668: Version 2.1 results 'compare' versus 1.3cbrun1-25/+105 Fix match by content regression introduced by the recent changes in the URIDistance computation. We were using a "simili uri" in the form of /someRef/indexInRef/otherRef . Problems are rising when some elements are added/removed in a collection the indexInRef is shifted and if you're 'unlucky' you'll ends up matching something (let's say an EAttribute) with another EAttribute which happens to be at the previous index. To lower this effect the weight of the location is kept minimum and the URIDistance is more fine grained (it used to be 0 : same URI, 10 : different URI) We are now leveraging the classical fragment mechanism of EMF (available in InternalEObject) to retrieve the fragment while supporting eKeys which matters a lot in those case. The URI Distance is also now more fine grained as it is counting the number of "hops" required to go from one location to another, leading to values which will go from 0 to 10 and not 0 or 10 exclusively.
2012-11-12Content Based Matchcbrun1-9/+9
Fix and tweak ratios (dumb constant leading to very high sensibility) Externalize a class responsible for providing weights for each feature. Make sure we are always using the same list of valid features while computing max distance and actualy comparing the EObjects
2012-09-18Fix ArrayIndexOutOfBound exception in URIDistancecbrun1-0/+2
2012-09-18We should not use stat similarity to compare URIscbrun1-0/+73
No more using the classical "string similarity" algorithm based on the dice coefficient to compare URIs. Introduces a specific implementation comparing URIs or fragments spliting the path and comparing those.
2012-09-17Adding tests for the Dice Coefficientlgoubet1-0/+116
2012-08-31Some more unit tests for the out-of-scope values merging.lgoubet1-2/+2
Fixing the related bugs they highlighted.
2012-08-22removed DiffEngineTest (doublon with DiffUtilTest)Mikaël Barbero1-115/+0
2012-08-03add a EMFCompareConfiguration class to configure the match/diff/mergeMikaël Barbero2-108/+83
process. Currently, it holds a Monitor and an EqualityHelper but can be augmented without breaking APIs (it's a class). The configuration can be retrieved from a Comparison object through an EOperation and is technically stored as an Adapter on the Comparison object.
2012-06-01React to changes introduced by CBR with the EqualityHelperlgoubet1-41/+83
2012-06-01Acting the change to CRLF since all projects' settings set this as the file ↵lgoubet2-8/+396
delimiter. Adding the necessary logic to determine the insertion index when merging reference and attribute values.
2012-06-01A few APIs changes :cbrun1-4/+8
-un-statify EqualityHelper so that we can adapt and change it if need be. -passing the way the IDiffProcessor is retrieved by he DefaultDiffEngine by passing it in the constructor and not through an overridable createProcessor() method, enabling the use of the DefaultDiffEngine to other uses cases than just computing a Comparison model (for instance just comparing two EObjects) One behavior change : - Equality helper is now matching EObjects which have no Match by relying on the uri fragment (if there is one), doing so the match does not consider the resource path which works best when you're comparing two files in the workspace
2012-05-22Basic testing of the LCS algorithmlgoubet1-0/+103

    Back to the top