显示其他模块的DXL列 [英] Show DXL columns from other modules

查看:57
本文介绍了显示其他模块的DXL列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一种类型的链接进行正式的工作.这些链接(我们称其为X型链接)是从4个不同的正式模块以4个深度级别创建的.例如,我在模块A中工作,该模块具有模块B的入链,具有模块C的入链,具有模块D的入链.

我有一个视图,该视图在不同的列中显示每个链接级别:第1列:深度1链接(AB),第2列:深度2链接(BC),第3列:深度3链接(CD).

每个列都是由这样的脚本生成的:

    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)

但是,现在,我必须添加一个新列,其中包含在模块C和其他未与我的模块(A)直接链接的其他新模块之间定义的其他类型的链接(类型Y).幸运的是,我在模块C的一列中有这些关系(作为布局dxl).

如何在模块(A)中显示在模块(C)的视图中保存的列要保存在当前视图中?

预先感谢您的合作和帮助

解决方案

按照Type X链接到模块C,然后按照Type Y链接.

更改:

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

收件人:

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

您可能需要其他数字,因为我不确定您的结构.

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

解决方案

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.

这篇关于显示其他模块的DXL列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆