From 2cd33eaf8292e0ac7939019b02c06f0aafde559e Mon Sep 17 00:00:00 2001 From: jlin16 Date: Mon, 23 Oct 2006 03:02:28 +0000 Subject: [PATCH] Do not display token number for Pcd in ModuleSA and Dynamic Pcd editors for FPD file. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1821 6f19259b-4bc3-4df7-8a09-765794883524 --- .../platform/ui/FpdDynamicPcdBuildDefinitions.java | 14 +++++++++++++- .../frameworkwizard/platform/ui/FpdModuleSA.java | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdDynamicPcdBuildDefinitions.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdDynamicPcdBuildDefinitions.java index c846160ca8..2dd39b459c 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdDynamicPcdBuildDefinitions.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdDynamicPcdBuildDefinitions.java @@ -11,6 +11,7 @@ import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableColumn; import org.tianocore.PlatformSurfaceAreaDocument; import org.tianocore.frameworkwizard.common.DataValidation; @@ -84,6 +85,7 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame { public void init(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) { if (ffc == null) { ffc = new FpdFileContents(fpd); + ffc.initDynPcdMap(); } String[][] saa = new String[ffc.getDynamicPcdBuildDataCount()][5]; ffc.getDynamicPcdBuildData(saa); @@ -154,7 +156,8 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame { modelPcd.addColumn("DatumType"); jTableDynPcd = new JTable(modelPcd); jTableDynPcd.setRowHeight(20); - + TableColumn tokenColumn = jTableDynPcd.getColumnModel().getColumn(1); + jTableDynPcd.removeColumn(tokenColumn); jTableDynPcd.getColumnModel().getColumn(0).setMinWidth(250); jTableDynPcd.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); @@ -556,6 +559,9 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame { if (jRadioButtonHii.isSelected()) { ffc.genDynamicPcdBuildDataSkuInfo("0", varName, varGuid, varOffset, hiiDefault, null, null, pcdSelected); ArrayList al = ffc.getDynPcdMapValue(cName + " " + tsGuid); + if (al == null) { + return; + } for (int i = 0; i < al.size(); ++i) { String mKey = moduleInfo (al.get(i)); ffc.updatePcdData(mKey, cName, tsGuid, null, null, hiiDefault); @@ -564,6 +570,9 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame { else if (jRadioButtonVpd.isSelected()){ ffc.genDynamicPcdBuildDataSkuInfo("0", null, null, null, null, vpdOffset, null, pcdSelected); ArrayList al = ffc.getDynPcdMapValue(cName + " " + tsGuid); + if (al == null) { + return; + } for (int i = 0; i < al.size(); ++i) { String mKey = moduleInfo (al.get(i)); ffc.updatePcdData(mKey, cName, tsGuid, null, null, vpdOffset); @@ -572,6 +581,9 @@ public class FpdDynamicPcdBuildDefinitions extends IInternalFrame { else{ ffc.genDynamicPcdBuildDataSkuInfo("0", null, null, null, null, null, value, pcdSelected); ArrayList al = ffc.getDynPcdMapValue(cName + " " + tsGuid); + if (al == null) { + return; + } for (int i = 0; i < al.size(); ++i) { String mKey = moduleInfo (al.get(i)); ffc.updatePcdData(mKey, cName, tsGuid, null, null, value); diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java index 5d26337411..18cb1603b9 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java @@ -688,6 +688,9 @@ public class FpdModuleSA extends JDialog implements ActionListener { model.addColumn("DefaultValue"); jTablePcd.getColumnModel().getColumn(0).setMinWidth(250); + + TableColumn tokenColumn = jTablePcd.getColumnModel().getColumn(3); + jTablePcd.removeColumn(tokenColumn); jTablePcd.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); jTablePcd.getSelectionModel().addListSelectionListener(new ListSelectionListener(){