set pcd data type to boolean when declaring a FEATURE_FLAG usage typed pcd in package...
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 28 Nov 2006 05:36:38 +0000 (05:36 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 28 Nov 2006 05:36:38 +0000 (05:36 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2025 6f19259b-4bc3-4df7-8a09-765794883524

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

index 1905b483bf92ca4ae5d06c517a6dc36f61bd8097..06a5d94417a330b9b40dfce9e9d1d308c4ba737c 100644 (file)
@@ -164,6 +164,9 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
     private final int supArchMinWidth = 200;\r
     private final int supModMinWidth = 200;\r
 \r
+//    private Object boolModifyLock = new Object();\r
+//    private boolean exclusiveUsage = false;\r
+\r
     /**\r
      This method initializes this\r
      \r
@@ -831,15 +834,29 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
                 JOptionPane.showMessageDialog(frame, "You must choose at least one usage for PCD entry.");\r
                 return;\r
             }\r
+\r
             if (column <= 10 && column >= 6) {\r
                 Vector<String> v = stringToVector(usage);\r
                 if (compareTwoVectors(v, stringToVector(sa[6]))) {\r
                     return;\r
                 }\r
-                if (v.contains("FEATURE_FLAG") && v.size() > 1) {\r
+                if (v.contains("FEATURE_FLAG")/* && v.size() > 1 && !exclusiveUsage*/) {\r
+                    if (v.size() > 1) {\r
                     JOptionPane.showMessageDialog(frame, "Usage Feature Flag can NOT co-exist with others.");\r
                     return;\r
                 }\r
+//                    synchronized (boolModifyLock){\r
+//                        exclusiveUsage = true;\r
+//                    }\r
+//                    m.setValueAt(false, row, 7);\r
+//                    m.setValueAt(false, row, 8);\r
+//                    m.setValueAt(false, row, 9);\r
+//                    m.setValueAt(false, row, 10);\r
+                    else {\r
+                        m.setValueAt("BOOLEAN", row, 3);\r
+                    }\r
+                    \r
+                }\r
             }\r
             \r
             if (column == 11) {\r
@@ -910,6 +927,7 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{
                         jCheckBoxFixedAtBuild.setSelected(false);\r
                         jCheckBoxDyn.setSelected(false);\r
                         jCheckBoxDynEx.setSelected(false);\r
+                        jComboBoxDataType.setSelectedItem("BOOLEAN");\r
                     }\r
                 }\r
             });\r