Do not display token number for Pcd in ModuleSA and Dynamic Pcd editors for FPD file.
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Oct 2006 03:02:28 +0000 (03:02 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Oct 2006 03:02:28 +0000 (03:02 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1821 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdDynamicPcdBuildDefinitions.java
Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java

index c846160..2dd39b4 100644 (file)
@@ -11,6 +11,7 @@ import javax.swing.ListSelectionModel;
 import javax.swing.event.ListSelectionEvent;\r
 import javax.swing.event.ListSelectionListener;\r
 import javax.swing.table.DefaultTableModel;\r
+import javax.swing.table.TableColumn;\r
 \r
 import org.tianocore.PlatformSurfaceAreaDocument;\r
 import org.tianocore.frameworkwizard.common.DataValidation;\r
@@ -84,6 +85,7 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
     public void init(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {\r
         if (ffc == null) {\r
             ffc = new FpdFileContents(fpd);\r
+            ffc.initDynPcdMap();\r
         }\r
         String[][] saa = new String[ffc.getDynamicPcdBuildDataCount()][5];\r
         ffc.getDynamicPcdBuildData(saa);\r
@@ -154,7 +156,8 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
             modelPcd.addColumn("DatumType");\r
             jTableDynPcd = new JTable(modelPcd);\r
             jTableDynPcd.setRowHeight(20);\r
-            \r
+            TableColumn tokenColumn = jTableDynPcd.getColumnModel().getColumn(1);\r
+            jTableDynPcd.removeColumn(tokenColumn);\r
             jTableDynPcd.getColumnModel().getColumn(0).setMinWidth(250);\r
             \r
             jTableDynPcd.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
@@ -556,6 +559,9 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
                 if (jRadioButtonHii.isSelected()) {\r
                     ffc.genDynamicPcdBuildDataSkuInfo("0", varName, varGuid, varOffset, hiiDefault, null, null, pcdSelected);\r
                     ArrayList<String> al = ffc.getDynPcdMapValue(cName + " " + tsGuid);\r
+                    if (al == null) {\r
+                        return;\r
+                    }\r
                     for (int i = 0; i < al.size(); ++i) {\r
                         String mKey = moduleInfo (al.get(i));\r
                         ffc.updatePcdData(mKey, cName, tsGuid, null, null, hiiDefault);\r
@@ -564,6 +570,9 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
                 else if (jRadioButtonVpd.isSelected()){\r
                     ffc.genDynamicPcdBuildDataSkuInfo("0", null, null, null, null, vpdOffset, null, pcdSelected);\r
                     ArrayList<String> al = ffc.getDynPcdMapValue(cName + " " + tsGuid);\r
+                    if (al == null) {\r
+                        return;\r
+                    }\r
                     for (int i = 0; i < al.size(); ++i) {\r
                         String mKey = moduleInfo (al.get(i));\r
                         ffc.updatePcdData(mKey, cName, tsGuid, null, null, vpdOffset);\r
@@ -572,6 +581,9 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame {
                 else{\r
                     ffc.genDynamicPcdBuildDataSkuInfo("0", null, null, null, null, null, value, pcdSelected);\r
                     ArrayList<String> al = ffc.getDynPcdMapValue(cName + " " + tsGuid);\r
+                    if (al == null) {\r
+                        return;\r
+                    }\r
                     for (int i = 0; i < al.size(); ++i) {\r
                         String mKey = moduleInfo (al.get(i));\r
                         ffc.updatePcdData(mKey, cName, tsGuid, null, null, value);\r
index 5d26337..18cb160 100644 (file)
@@ -688,6 +688,9 @@ public class FpdModuleSA extends JDialog implements ActionListener {
             model.addColumn("DefaultValue");\r
             \r
             jTablePcd.getColumnModel().getColumn(0).setMinWidth(250);\r
+            \r
+            TableColumn tokenColumn = jTablePcd.getColumnModel().getColumn(3);\r
+            jTablePcd.removeColumn(tokenColumn);\r
                         \r
             jTablePcd.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
             jTablePcd.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\r