DOORS Layout DXL 显示模块基线中的对象文本

huangapple go评论49阅读模式
英文:

DOORS Layout DXL to Display Object Text from Module Baseline

问题

我正在尝试向正式模块添加一个DXL布局,该布局显示特定基线中每个对象的对象文本。

我只想看到对象文本在修改前后的对比,这似乎是许多人都想要做的事情。我已经查看了基线比较功能,但它不符合我的要求。

我尝试过的一切都失败了。请帮忙!

英文:

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!

答案1

得分: 1

以下是翻译好的内容:

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

但有很多要考虑的事情(自基线以来已创建/删除/清除的对象,对其他属性的更改,对象包含OLE对象,对象是表格的一部分,如何显示与以前基线的差异(甚至可能在一个视图中),默认视图不显示基线/筛选的对象,对象是DOORS图片,也许您还想显示结构更改或链接更改等等)。要使这个脚本在一个相当大的模块中运行可能需要相当大的努力。

有专业工具可用,可以提供这种比较功能,除了更改的分支和合并之外还有。

英文:

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.

huangapple
  • 本文由 发表于 2023年5月30日 12:00:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/76361536.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定