refactor(CreateTempDrawingDialog):优化属性列表循环逻辑

-跳过属性列表中的第一个元素(版本号)
- 优化循环结构,提高代码可读性- 移除不必要的注释代码
mian
熊朝柱 1 month ago
parent ad1933016c
commit 9444e41148

@ -87,6 +87,7 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
/**
*
* *=Item.object_name=string
* ;
*/
private List<String> preferencePropList = new ArrayList<>();
@ -327,7 +328,8 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
String value = getComponentValue(key,entry.getValue());//根据组件获取选中、输入的值
int tag = 0;
//遍历首选项配置,获取属性真实值和位置、类型等信息
for (String prop : preferencePropList){
for (int i = 1; i < preferencePropList.size(); i++){
String prop = preferencePropList.get(i);
String[] split = prop.split("=");
if (split != null && split.length > 0) {
String propName = split[0];
@ -873,7 +875,6 @@ public class CreateTempDrawingDialog extends JFrame implements ActionListener{
}
System.out.println("配置的属性数量 = "+this.preferencePropList.size());
// for(String propInfo : this.preferencePropList){//propInfo格式为*名称=Item.object_name=string
String[] revIDs = this.preferencePropList.get(0).split(";");//版本下拉框的数组
if (revIDs != null && revIDs.length > 0) {

Loading…
Cancel
Save