0

DXL/DOORS のヘルプを探しています...

A、B、および C の 3 つのモジュールがあります。B は A にリンクされ、C は B にリンクされています。したがって、B は深さ 1 で、C は深さ 2 です。A に列を作成しようとしています。 B と C からのインライン オブジェクトのオブジェクト テキスト、モジュール名、およびオブジェクト番号。ただし、B と C の両方について、これら 3 つ (テキスト、名前、番号) をすべて表示したくはありません。 B からのオブジェクト テキストと、C からのモジュール名とオブジェクト番号のみを表示します。理想的には、B からの情報の直後に C からの情報を角括弧で囲みます。次のようにしたいと思います。

Aの列内:「Bからのオブジェクトテキスト」[「Cのモジュール名」「Cのオブジェクト番号」]

ウィザードを使用して以下のレイアウト DXL スクリプトを作成しましたが、現在、B と C の両方の 3 つの情報がすべて表示されています。 C からのモジュール名とオブジェクト番号 (深さ 2)?

注: 以下のスクリプトでは、最後に s、p、および t を希望する順序で表示するように調整しました。

// DXL generated by DOORS traceability wizard on 27 October 2014.
// Wizard version 2.0, DOORS version 9.5.2.1
pragma runLim, 0
const int indentStep = 360
Buffer indentBuff = create
Buffer lineBuff = create
lineBuff = "______________________"
string indentAllParagraphs(string s, bool addBullets, int addedIndent)
{
    int numParas = 0
    RichTextParagraph rtp
    indentBuff = s
    for rtp in s do
    {
        numParas++
        Buffer t = create()
        t += rtp.text
        if (length(t) > 0 )
        {
            bool hasBullet = rtp.isBullet
            int  indentLev = rtp.indentLevel
            indentBuff = applyTextFormattingToParagraph(indentBuff, hasBullet, indentLev+addedIndent, numParas)
        }
        delete(t)
    }
    return (numParas == 0 ? "" : tempStringOf(indentBuff))
}
int lines[2] = {0, 0}
void adjustLines(int depth, showAtDepth) {
    int count
    for (count = 0; count < 2; 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 = "*"
    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]
        doneOne = true
        {
            s = name(otherMod)
            p = probeRichAttr_(othero,"Object Number", false)
            t = probeRichAttr_(othero,"Object Text", false)
            displayRich(t" ""["s" "p"]")
        }
        lines[depth-1] += 3
        if ( depth < 2 ) {
            showIn(othero, depth+1)
        }
    }
}
showIn(obj,1)
delete indentBuff
delete lineBuff
4

1 に答える 1

0

これが私がそれにアプローチする方法です:

モジュール B: モジュール C から必要な情報を取得する DXL 属性を作成します。たとえば、モジュール名とオブジェクト番号を収集する「C オブジェクト情報」と呼ばれる属性です。(私は通常、[分析] > [ウィザード] でこれを行い、[ツール] > [サポート ツール] > [レイアウト DXL を属性 DXL に変換] を使用してから、DXL を微調整します)。したがって、モジュール C からのインリンクを持つモジュール B の各オブジェクトには、モジュール A でアクセスできるこの属性「C オブジェクト情報」があります。

モジュール A: モジュール B から必要な情報を取得してフォーマットする DXL レイアウトを作成します ([分析] > [ウィザード] を使用): 「オブジェクト テキスト [C オブジェクト情報]」

[このようにすることが DOORS の良い実践かどうかはわかりませんが、スクリプト作成が少し簡単になります。「[Object ID] Object Text」のような情報のチャンクを、リンク階層の複数のレベルにわたって取得することがわかっている場合 (たとえば、モジュール A の customerRequirement からモジュール B の systemRequirement からモジュール C サブシステムの要件に移動すると、 my systemRequirement モジュールの customerRequirement と subsystemRequirement の DXL 属性により、複数のリンク レベルからデータにアクセス/表示/操作できるようになります。これは、トレーサビリティ レポート、検証/検証手順の開発などに役立ちます。]

于 2014-11-05T16:44:21.420 に答える