ibm-doors - 如何在 DOORS 中一次删除多行?
问题描述
背景
我正在从 DOORS 文件中删除过时的信息行。我知道如何删除行的方法是通过以下过程一次执行一个:
- 选择我要删除的行
- 打开表格菜单
- 挥动删除选项
- 点击行选项
- 对每一行重复。
问题
有没有办法在 DOORS 中一次批量删除多行?
解决方案
所以 - 这比看起来要复杂一些,主要是因为 DOORS 不允许在没有 DXL 脚本的情况下非顺序选择项目。
如果我这样做,我会执行以下操作:
首先,将要删除的每一行的第一个元素设置为可识别的内容 - 例如,“||DELETED||”
接下来,我将运行以下代码:
// Use the current module
Module m = current
// Grab the first object
Object o = first ( m )
// Loop through the objects in the module - using a deletion in the loop, so no for o in m
while ( !null o ) {
// Check for our deletion flag
if ( o."Object Text" "" == "||DELETED||" ) {
// Grab the parent object - this will actually be the 'row object'
Object oP = parent ( o )
// Set 'o' to point to the object right before the deletion (to allow loop to continue)
o = previous ( parent ( o ) )
// Softdelete that row object
softDelete ( oP )
}
// Go to the next object (on the last object, will set equal to null)
o = next ( o )
}
这可能不是解决这个问题的最佳方法——我一直想尝试一下 GUI 中的非顺序选择。但它应该完成你想要做的事情。
推荐阅读
- android - Android:尝试使用数据绑定为 CardView 设置布局权重
- c++ - GCC 模板:错误:在 '<' 标记之前需要 ',' 或 '...'
- swift - 翠鸟更新 KFImage url 不会更新 SwiftUI 中的图像
- dynamic-programming - 0/K 背包。怎么解决?
- batch-file - 批处理文件中的最小值到最大值
- javascript - Vuetify v-dialog 使用后挂载多次且不在循环内
- java - 使用多图选择模式时不能只选择一张图
- javascript - 当一个函数数组作为参数传递给另一个函数时,如何返回一个承诺?
- reactjs - 如何在反应样式的组件中使用自定义图标?
- c - 来自 Ghidra 的反编译程序集中的像素转换