]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. change SPD Pcd editor title to "PCD Declarations".
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 17 Jul 2006 05:12:50 +0000 (05:12 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 17 Jul 2006 05:12:50 +0000 (05:12 +0000)
2. PCD editor: remove attribute SupArchList, SupModList if no value set for them.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1027 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdFileContents.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdHeader.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdPcdDefs.java

index 3b5c686956459e616c8819ad0ed36c081e457b87..6bd63d43b484f5c826b4c7c3bf254926f0089a5f 100644 (file)
@@ -551,12 +551,23 @@ public class SpdFileContents {
             e.setTokenSpaceGuidCName(spaceGuid);\r
             e.setDefaultValue(defaultString);\r
             e.setHelpText(help);\r
             e.setTokenSpaceGuidCName(spaceGuid);\r
             e.setDefaultValue(defaultString);\r
             e.setHelpText(help);\r
-            if (archList != null && archList.length() > 0){\r
+            if (stringToList(archList) != null){\r
                 e.setSupArchList(stringToList(archList));\r
             }\r
                 e.setSupArchList(stringToList(archList));\r
             }\r
-            if (modTypeList != null && modTypeList.length() > 0){\r
+            else{\r
+              if (e.isSetSupArchList()) {\r
+                e.unsetSupArchList();\r
+              }\r
+            }\r
+            if (stringToList(modTypeList) != null) {\r
                 e.setSupModuleList(stringToList(modTypeList));\r
             }\r
                 e.setSupModuleList(stringToList(modTypeList));\r
             }\r
+            else{\r
+              if (e.isSetSupModuleList()) {\r
+                e.unsetSupModuleList();\r
+              }\r
+            }\r
+            \r
         } \r
         cursor.dispose();\r
     }\r
         } \r
         cursor.dispose();\r
     }\r
index 3f39727e4e0c32093d224c30c91bed0e116ecc1f..046fe8cb6c430e37d489df7cc47f9a3740d53f3a 100644 (file)
@@ -29,6 +29,7 @@ import javax.swing.JScrollPane;
 import javax.swing.JTextArea;\r
 import javax.swing.JTextField;\r
 \r
 import javax.swing.JTextArea;\r
 import javax.swing.JTextField;\r
 \r
+\r
 import org.tianocore.PackageSurfaceAreaDocument;\r
 import org.tianocore.frameworkwizard.common.DataValidation;\r
 import org.tianocore.frameworkwizard.common.Log;\r
 import org.tianocore.PackageSurfaceAreaDocument;\r
 import org.tianocore.frameworkwizard.common.DataValidation;\r
 import org.tianocore.frameworkwizard.common.Log;\r
index 742081a4b5e3efbaa53ed7dba7f7f15f08ad9552..ba2d55bd7a0948532cd79d0b3587085a3950a9dd 100644 (file)
@@ -156,7 +156,7 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
      \r
      **/\r
     private void initialize() {\r
      \r
      **/\r
     private void initialize() {\r
-        this.setTitle("PCD Definition");\r
+        this.setTitle("PCD Declarations");\r
         this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r
 \r
     }\r
         this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r
 \r
     }\r
@@ -731,8 +731,15 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
             String defaultVal = m.getValueAt(row, 4) + "";\r
             String help = m.getValueAt(row, 5) + "";\r
             String usage = getValidUsage(new Boolean(m.getValueAt(row, 6)+""), new Boolean(m.getValueAt(row, 7)+""), new Boolean(m.getValueAt(row, 8)+""), new Boolean(m.getValueAt(row, 9)+""), new Boolean(m.getValueAt(row, 10)+""));\r
             String defaultVal = m.getValueAt(row, 4) + "";\r
             String help = m.getValueAt(row, 5) + "";\r
             String usage = getValidUsage(new Boolean(m.getValueAt(row, 6)+""), new Boolean(m.getValueAt(row, 7)+""), new Boolean(m.getValueAt(row, 8)+""), new Boolean(m.getValueAt(row, 9)+""), new Boolean(m.getValueAt(row, 10)+""));\r
-            String archList = vectorToString(iCheckBoxList.getAllCheckedItemsString());\r
-            String modTypeList = vectorToString(iCheckBoxList1.getAllCheckedItemsString());\r
+            \r
+            String archList = null;\r
+            if (m.getValueAt(row, 11) != null){\r
+                archList = m.getValueAt(row, 11).toString();\r
+            }\r
+            String modTypeList = null;\r
+            if (m.getValueAt(row, 12) != null) {\r
+                modTypeList = m.getValueAt(row, 12).toString(); \r
+            }\r
             if (usage.length() == 0) {\r
                 JOptionPane.showMessageDialog(frame, "You must choose at least one usage for PCD entry.");\r
                 return;\r
             if (usage.length() == 0) {\r
                 JOptionPane.showMessageDialog(frame, "You must choose at least one usage for PCD entry.");\r
                 return;\r