Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » AbstractChangeFactory.fillRequiredDifferences() may cause circular dependencies
AbstractChangeFactory.fillRequiredDifferences() may cause circular dependencies [message #1836325] Tue, 29 December 2020 02:41
Akira Asakawa is currently offline Akira AsakawaFriend
Messages: 2
Registered: September 2020
Junior Member
Hello

I'm using EMF compare 3.5.3.202003070301 with custom macroscopic differences.

It seems to me that the execution of fillRequiredDifferencesForMacroToMacro() and fillRequiredDifferencesForUnitToMacro() by fillRequiredDifferences() is not necessary.

As of 507177 , refines/refinedBy are now merged together, so requires/requiredBy is no longer needed. However, since refines are handled by getDirectResultingMerges(), but requires/requiredBy are handled by getDirectMergeDependencies(), depending on the direction of the merge, a cycle of preconditions may occur if both of these are configured.


  • fillRequiredDifferencesForMacroToMacro()

    • extension.requires.addAll(extension.refinedBy.requires.refines)
    • extension.requiredBy.addAll(extension.refinedBy.requiredBy.refines)

  • fillRequiredDifferencesForUnitToMacro()

    • extension.requires.addAll(extension.refinedBy.requires)
    • extension.requiredBy.addAll(extension.refinedBy.requiredBy)



The two ends are different, but the overview is as above, and the pathways it adds are similar.
And these will be merged properly even if you don't add them, because the dependency when merging forward with AbstractMerger is as follows.


  • getDirectMergeDependencies(extension)'s result contains "refinedBy(extension.refinedBy)"
  • getDirectMergeDependencies(extension.refinedBy)'s result contains "requires(extension.refinedBy.requires)"
  • getDirectResultingMerges(extension.refinedBy.requires)'s result contains "refines(extension.refinedBy.requiredBy.refines)"
  • Merging "extension" will result in all paths up to "extension.requires.refines" being merged
  • If you use "extension.requiredBy.refines" as a starting point, all paths up to "extension" will be merged as well


Thanks
Akira
Previous Topic:Crossover operation by EMF Compare
Next Topic:Load resources from revision control
Goto Forum:
  


Current Time: Wed Dec 11 16:48:24 GMT 2024

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

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

Back to the top