From 2109b16ef8007fd4033041065318fb199227628a Mon Sep 17 00:00:00 2001 From: jlin16 Date: Tue, 28 Nov 2006 05:36:38 +0000 Subject: [PATCH] set pcd data type to boolean when declaring a FEATURE_FLAG usage typed pcd in package pcd declarations editor. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2025 6f19259b-4bc3-4df7-8a09-765794883524 --- .../packaging/ui/SpdPcdDefs.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdPcdDefs.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdPcdDefs.java index 1905b483bf..06a5d94417 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdPcdDefs.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/packaging/ui/SpdPcdDefs.java @@ -164,6 +164,9 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{ private final int supArchMinWidth = 200; private final int supModMinWidth = 200; +// private Object boolModifyLock = new Object(); +// private boolean exclusiveUsage = false; + /** This method initializes this @@ -831,15 +834,29 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{ JOptionPane.showMessageDialog(frame, "You must choose at least one usage for PCD entry."); return; } + if (column <= 10 && column >= 6) { Vector v = stringToVector(usage); if (compareTwoVectors(v, stringToVector(sa[6]))) { return; } - if (v.contains("FEATURE_FLAG") && v.size() > 1) { + if (v.contains("FEATURE_FLAG")/* && v.size() > 1 && !exclusiveUsage*/) { + if (v.size() > 1) { JOptionPane.showMessageDialog(frame, "Usage Feature Flag can NOT co-exist with others."); return; } +// synchronized (boolModifyLock){ +// exclusiveUsage = true; +// } +// m.setValueAt(false, row, 7); +// m.setValueAt(false, row, 8); +// m.setValueAt(false, row, 9); +// m.setValueAt(false, row, 10); + else { + m.setValueAt("BOOLEAN", row, 3); + } + + } } if (column == 11) { @@ -910,6 +927,7 @@ public class SpdPcdDefs extends IInternalFrame implements TableModelListener{ jCheckBoxFixedAtBuild.setSelected(false); jCheckBoxDyn.setSelected(false); jCheckBoxDynEx.setSelected(false); + jComboBoxDataType.setSelectedItem("BOOLEAN"); } } });