Show DXL columns from other modules

2019-07-28 05:16发布

I'm working in a formal module with one type of in-links. These links (we call it as Type X links) are made in 4 depth level from 4 different formal modules. For example I'm working in module A, that have in-links from module B, that have in-links from module C, that have in-links from module D.

I have a view that shows in different columns each in-link level: Column 1: Depth 1 links (A-B), Column 2: Depth 2 links (B-C), Column 3: Depth 3 links (C-D).

Each column is generated by an script like this:

    pragma runLim, 0
    int lines[4] = {0, 0, 0, 0}
    void adjustLines(int depth, showAtDepth) {
    int count
    for (count = 0; count < 4; count++) {
    while (lines[depth-1] < lines[count]) {
        if (depth == showAtDepth) displayRich("\\pard " " ")
        lines[depth-1]++
    }
  }
}
void showIn(Object o, int depth) {
Link l
LinkRef lr
ModName_ otherMod = null
Module linkMod = null
ModuleVersion otherVersion = null
Object othero
string disp = null
string s = null
string plain, plainDisp
int plainTextLen
int count
bool doneOne = false

    string linkModName = "../links/TYPE X"
    for lr in all(o<-linkModName) do {
        otherMod = module (sourceVersion lr)
        if (!null otherMod) {
            if ((!isDeleted otherMod) && (null data(sourceVersion lr))) {
                load((sourceVersion lr),false)
            }
        }
    }
    for l in all(o<-linkModName) do {
        otherVersion = sourceVersion l
        otherMod = module(otherVersion)
        if (null otherMod || isDeleted otherMod) continue
        othero = source l
        if (null othero) {
            load(otherVersion,false)
        }
        othero = source l
        if (null othero) continue
        if (isDeleted othero) continue
        int oldLines = lines[depth-1]
        adjustLines(depth, 1)
        bool kick = (doneOne) && (lines[depth-1] == oldLines)
        if (kick) {
            lines[depth-1]++
            if (depth == 1) displayRich("\\pard " " ")
        }
        if (depth < 4) {
            showIn(othero, depth+1)
        }
        doneOne = true
        if (depth == 1) {
            s = name(otherMod)
            if (isBaseline(otherVersion)) {
                s = s " [" versionString(otherVersion) "]"
            }

        s = "{\\b " s " : }"
        s = s " " probeRichAttr_(othero,"Object Heading", false)
        s = s " " probeRichAttr_(othero,"Object Text", false)

        displayRich s

        }
        lines[depth-1] += 3
    }
}
showIn(obj,1)

However now, I have to add a new column that contains other type of link (Type Y) defined between module C and other new module do not linked directly with my module (A). Fortunately, I have these relationship in a column at module C (as a layout dxl).

How can I show in my module (A) that column saved in a view at module (C) to be saved in my current view?

Thank you in advance for your cooperation and your help

标签: ibm-doors
1条回答
Evening l夕情丶
2楼-- · 2019-07-28 05:47

Follow the Type X links to module C, and then follow Type Y links.

Change:

string linkModName = "../links/TYPE X"

To:

string linkModName = (depth<3) ? "../links/TYPE X" : "../links/TYPE Y"

You may need a different number as I'm not sure of you structure.

查看更多
登录 后发表回答