]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdGuidDecls.java
Fix the bug of leaving empty GuidTypeList, SupArchList attributes in xml file.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / packaging / ui / SpdGuidDecls.java
index 91f4ba64de10d3e4179d4b67a029e7669de685a7..6459c2c56ed432d7c0fe731392779d163b81f9b6 100644 (file)
@@ -252,9 +252,7 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
        int row = arg0.getFirstRow();\r
        TableModel m = (TableModel)arg0.getSource();\r
        if (arg0.getType() == TableModelEvent.UPDATE){\r
-           if (docConsole != null) {\r
-               docConsole.setSaved(false);\r
-           }\r
+           \r
            updateRow(row, m);\r
        }\r
    }\r
@@ -280,7 +278,9 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
        if (!dataValidation(rowData)){\r
            return;\r
        }\r
-       \r
+       if (docConsole != null) {\r
+           docConsole.setSaved(false);\r
+       }\r
        sfc.updateSpdGuidDecl(row, name, cName, guid, help, archList, modTypeList, guidTypeList);\r
    }\r
     /**\r
@@ -549,9 +549,7 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
             if (!dataValidation(row)) {\r
                 return;\r
             }\r
-            if (docConsole != null) {\r
-                docConsole.setSaved(false);\r
-            }\r
+            \r
             model.addRow(row);\r
             jTable.changeSelection(model.getRowCount()-1, 0, false, false);\r
             addRow(row);\r
@@ -610,17 +608,35 @@ public class SpdGuidDecls extends IInternalFrame implements TableModelListener{
     \r
     protected void addRow(String[] row) {\r
         Vector<String> vArch = iCheckBoxList.getAllCheckedItemsString();\r
+        if (vArch.size() == 0) {\r
+            vArch = null;\r
+        }\r
         Vector<String> vModType = iCheckBoxList2.getAllCheckedItemsString();\r
+        if (vModType.size() == 0) {\r
+            vModType = null;\r
+        }\r
         Vector<String> vguidType = iCheckBoxList1.getAllCheckedItemsString();\r
+        if (vguidType.size() == 0) {\r
+            vguidType = null;\r
+        }\r
+        if (docConsole != null) {\r
+            docConsole.setSaved(false);\r
+        }\r
         sfc.genSpdGuidDeclarations(row[0], row[1], row[2], row[3], vArch, vModType, vguidType);\r
     }\r
     \r
     protected void removeRow(int i){\r
         sfc.removeSpdGuidDeclaration(i);\r
+        if (docConsole != null) {\r
+            docConsole.setSaved(false);\r
+        }\r
     }\r
     \r
     protected void clearAllRow(){\r
         sfc.removeSpdGuidDeclaration();\r
+        if (docConsole != null) {\r
+            docConsole.setSaved(false);\r
+        }\r
     }\r
 \r
     /**\r