Plex 2E

  • 1.  [Model API] How to check if large property is locally overriden?

    Posted May 23, 2016 10:05 AM

    Is there a method or an easy way to find out, if the large properties of a source code object is locally overriden?

     

    I have a funciton BaseFnc with a scoped source code object.

    There are two other functions ImplUnModified and ImplLocalOverride which are inheriting from BaseFnc.

    The inherited source code objects are made real in both cases, in the function ImplLocalOverride I modify the content of the source code object.

     

    BaseFnc source code SRC mysource

    BaseFnc.mysource = "originaltext"

     

    ImplUnModified is a FNC BaseFnc

     

    ImplLocalOverride is a FNC BaseFnc

    ImplFnc.mysource = "localy overriden"

     

     

    Is there a way to check directly via ModelAPI if an inherited source code object is locally overriden.

    Alternatively is there an enumerator to iterate over the inheritance path of an source code object?



  • 2.  Re: [Model API] How to check if large property is locally overriden?

    Posted May 23, 2016 12:23 PM

    great question and in short no for Source code objects, action diagrams yes, messages no, panels no

     

    now you could go and get scoping objects and check for is a triples and others and checking their scopiong objects and check their large property then compare with your own etc but just too many triple combinations to consider.



  • 3.  Re: [Model API] How to check if large property is locally overriden?
    Best Answer

    Posted May 23, 2016 12:31 PM

    why?

     

    I do use Function: PlexAPILib30.IPlexAPI.SetOriginalName, Function: PlexAPILib30.IPlexAPI.GetOriginalName  to 'mark' objects as changed by me previously using a model api process.



  • 4.  Re: [Model API] How to check if large property is locally overriden?

    Posted May 30, 2016 12:27 PM

    # 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



  • 5.  Re: [Model API] How to check if large property is locally overriden?

    Posted May 30, 2016 03:18 PM

    errrr this is exactly what Export Large Properties - Stella Tools (CA Plex Developer Tools) does! Export the source objects only. Make your changes. export again. Compare with TotalCommander. Create List from Export File - Stella Tools (CA Plex Developer Tools) a list of the changed objects.



  • 6.  Re: [Model API] How to check if large property is locally overriden?

    Posted May 30, 2016 03:28 PM

    look give me a shout and I can give you hand doing the impact analysis.



  • 7.  Re: [Model API] How to check if large property is locally overriden?

    Posted May 31, 2016 03:25 AM

    What I would do is take snap shots and compare

     

    SnapShot1 - Copy Local  model - Export Source Objects

    SnapShot2 - Use Copy Local model - Change Source objects (Base Objects) - Export Source Objects

    SnapShot3 - Use Copy Local model - Delete Large Property of Base objects not object -Change Source objects (Base Objects) - Export Source Objects

     

    Comparing SnapShot3 with SnapShot2 will show the overriden !

     

    Use Create List from Export File - Stella Tools (CA Plex Developer Tools) to create list of overridden objects. Then create dependency List, then G&B

     

    Again should really only take a matter of hours and give me a shout and I can help. Someone in the Plex community must have some work for me to do!!!!!!!!!