|Default Behaviour for matching derived features [message #1746365]
||Thu, 27 October 2016 14:04
| Conor O'Mahony
Registered: August 2016
In my ecore model, I have a "Block" class and an "Input" class, where the Block class has a reference feature "inputs", which is a list of Inputs.|
The reference doesn't contain all the Inputs we want to compare using EMF compare, (in our application we query another model object "BlockType" to gather the full list of Inputs for that Block).
Essentially I want to compare all relevant Inputs for a Block, so I added another derived, transient, volatile feature to the ecore model - "derivedInputs", where the getDerivedInputs() method implementation returns a list of Inputs, the ones contained on the Block object itself and the extra ones from the BlockType object.
For the EMF compare, I extend DefaultDiffEngine, and override createFeatureFilter() method to return a FeatureFilter, which in turn implements isIngnoredReference() to ignore the original BLOCK_INPUTS feature and to NOT ignore the derived feature BLOCK_DERIVED_INPUTS,
This seems to work fine for differencing - when two blocks are matched and being diffed it shows the Derived Inputs differences, but it seem to be missing a step that matches these Derived Inputs to begin with, it looks like they are not considered in the matching engine. I have my own IdentifierEObjectMatcher class with a custom ID function, which was returning an ID for Input objects but this is no longer being called for the Derived Inputs -
Is there a step that I am missing to include the derived feature in the scope of the matching as well?
Powered by FUDForum
. Page generated in 0.02024 seconds