if (null obj || null attrDXLName) halt if (isBaseline(module(obj))) halt /* This attribute DXL was generated on 11/13/2012 12:06:44. */ // prevent dxl timeout dialog pragma runLim, 0 Buffer bsz = create void endAttributeDXL() { if (!null obj && attrDXLName != "") { if(canModify(obj)) {obj.attrDXLName = richText tempStringOf(bsz)} } delete bsz } void addNewLineSeparator(Buffer& b) { if (length(b) > 0) { b += "\n" } } void display(string s) { addNewLineSeparator(bsz) bsz += s } void displayRich(string s) { addNewLineSeparator(bsz) bsz += s } void displayRichWithColour(string s) { addNewLineSeparator(bsz) bsz += s } void displayRichWithColor(string s) { addNewLineSeparator(bsz) bsz += s } void display(Attr__ a) { string s = richText a if (!null s) { displayRich s } } //********** //#include // Refresh DXL Attributes // DXL generated by DOORS traceability wizard on 11 November 2012. // Wizard version 2.0, DOORS version 9.3.0.7 pragma runLim, 0 const int indentStep = 360 Buffer indentBuff = create Buffer lineBuff = create lineBuff = "______________________" const Regexp LINKRegx = regexp2 "(parent2child|child2parent|See also|SDM)" const Regexp isPatt = regexp2 "^([^,]*)#([^#a-zA-Z][0-9]*)$" Skip Xopened = createString 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[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 ModulesXopen(Skip &Xopened, int depth, bool flag) { string mName = null for mName in Xopened do { if (open(module mName)) { string ModDepth = key(Xopened) if (isPatt ModDepth) { //print ModDepth[match 0] "\n" Match all //print ModDepth[match 1] "\n" Module name //print ModDepth[match 2] "\n" Module depth int cDepth = intOf(ModDepth[match 2]) if(flag || cDepth > depth) { close (module item mName) } } else { errorBox("[match] {'"mName"'}") } } } } void showIn(Object o, int depth) { Link l LinkRef lr ModName_ otherMod = null string s = null ModuleVersion otherVersion = null Object othero for lr in all(o<-"*") do { ModuleVersion mvSource = sourceVersion lr otherMod = module mvSource if (!null otherMod) { if ((!isDeleted otherMod) && (null data(mvSource))) { load((mvSource),false) put(Xopened, fullName(mvSource)"#"depth"", fullName(mvSource)) } } delete mvSource } for l in all(o<-"*") do { if(LINKRegx name(module l)) continue ModuleVersion otherVersion = sourceVersion l // Use assignment in declaration, otherwise: Leak otherMod = module(otherVersion) if (null otherMod || isDeleted otherMod) { delete otherVersion; continue } othero = source l if (null othero) {load(otherVersion,false); put(Xopened, fullName(otherVersion)"#"depth"", fullName(otherVersion))} othero = source l if (null othero) { delete otherVersion; continue } if (isDeleted othero) { delete otherVersion; continue } doneOne = true { //displayRich tempStringOf applyTextFormattingToParagraph(lineBuff, false, (depth-1) * indentStep, 0) s = name(otherMod) if (isBaseline(otherVersion)) {s = s " [" versionString(otherVersion) "]"} s = indentAllParagraphs(s, false, (depth-1) * indentStep) if (s == "") {displayRich("\\pard " " ")} else { s = s "-" probeRichAttr_(othero,"Absolute Number", false) if( name(module(o)) == name(module(othero)) ) {s = "(" s ")"} s = indentAllParagraphs(s, false, (depth-1) * indentStep) displayRich("\\pard " s) //displayRich("\\pard Depth: " depth "\t" s) } ExternalLink extLink for extLink in o<-"" do { disp = "{\\b External Links: }" s = richText description(extLink) disp = disp s s = richText body(extLink) disp = disp " " s s = richText name(extLink) disp = disp " " s s = indentAllParagraphs(disp, false, (depth-1) * indentStep) displayRich("\\pard " s) //displayRich("\\pard Depth: " depth "\t" s) } } delete otherVersion lines[depth-1] += 2 ModulesXopen(Xopened, depth, false) if ( depth < 4 ) {showIn(othero, depth+1)} } s = null } showIn(obj,1) ModulesXopen(Xopened, 99, true) // close all modules... delete indentBuff delete lineBuff delete Xopened delete LINKRegx delete isPatt //********** endAttributeDXL()