# why?
Impact analysis of pattern changes. To get a rough idea were manual work is needed.
We are using the Websydian Pattern Libraries.
Most of the Functions have multiple source code objects scoped.
Those Objects are not used by the function directly (no call, no meta code),
rather the content is extracted and later used at runtime.
So the function and the source code must still make sense together.
We are going to restructure our patterns and are going to change the large properties of some source code objects.
Therefore we need to identify the locally overridden source code objects which will not be changed automatically.
# idea
Extract information about all the source code objects and store them in a database table for easy comparison of the large properties.
Make a before Pattern modification and after Pattern modification comparison.
- if the lp hasn't changed -> the source code object was locally overridden
- it doesn't tell us if it was locally overridden without any modification
Therefore also extract the lp of the source code object of the first "base object", last in the list of the inheritance path
- Tell's me if the content is different.
- Doesn't tell me if it was locally overridden without any actual change (e.g. add a blank remove a blank, happens way to often sadly)
But if i now bring the two approaches together i actually can get the information where something was intentional locally overridden.
# Pseudo Code to retrieve first object in the Inheritance Path
To get the first object in the inheritance path of a specific source code object i now do the following:
foreach parent_object in object.scope_chain [EntA.FncB.FncC.SrcD] (from inner to outer: FncC, FncB, EntA)
foreach non_virtual_inheritance target_object (in reverse order)
walk the scoped object tree of target_object
> each object must match the type and name of the respective depth level of object.scope_chain
> return the first match