Search code examples
layoutibm-doors

DOORS Layout DXL to Display Object Text from Module Baseline


I am trying to add a layout DXL to a formal module that displays the object text for each object from a specific baseline.

I just want to see a side-by-side comparison of the object text before and after modification, which seems like something many people would want to do. I've looked at the baseline comparison function, but it does not do what I want.

Everything I've tried has failed. Please help!


Solution

  • Well, a minimal working script for showing comparisons in a DXL Layout column would be this:

    Object oCur = obj
    
    Module mCur = module oCur
    Baseline bl = getMostRecentBaseline(mCur)
    Module mBL = load (moduleVersion (module mCur, bl), false)
    if null mBL then halt
    Object oBL = object (intOf realOf (oCur."Absolute Number" ""), mBL)
    if null oBL then halt
    
    Buffer bResult = create
    Buffer bCur = create
    bCur = oCur."Object Text" ""
    Buffer bBL = create
    bBL = oBL."Object Text" ""
    string sError = diff (bResult, bBL, bCur)
    if (null sError) {
        displayRichWithColour tempStringOf bResult
    } else {
        display sError
    }
    delete bResult
    delete bCur 
    delete bBL
    

    But there are quite a lot of things to consider (object has been created/deleted/purged since baseline, changes to other attributes, object contains OLE Objects, object is part of a table, how to show differences to earlier baselines (perhaps even in one view), default view does not show the object of the baseline / filter, object is DOORS picture, do you perhaps also want to show structural changes or link changes, ...). It might become quite an effort to get this script running for a rather large module.

    There are professional tools available that have such comparison functionality available, in addition to branches and merges of changes.