From: jlin16 Date: Wed, 2 Aug 2006 09:34:27 +0000 (+0000) Subject: set MaxDatumSize for PcdData. X-Git-Tag: edk2-stable201903~24694 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=802e005517d1c21865c5d50c0933abc8289ea5de set MaxDatumSize for PcdData. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1178 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java index b8c80b48cc..e0a0137ef7 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java @@ -906,6 +906,25 @@ public class FpdFileContents { fpdPcd.setTokenSpaceGuidCName(tsGuid); fpdPcd.setDatumType(PcdDataTypes.Enum.forString(dataType)); fpdPcd.setItemType(PcdItemTypes.Enum.forString(itemType)); + if (dataType.equals("UINT8")){ + fpdPcd.setMaxDatumSize(1); + } + if (dataType.equals("UINT16")) { + fpdPcd.setMaxDatumSize(2); + } + if (dataType.equals("UINT32")) { + fpdPcd.setMaxDatumSize(4); + } + if (dataType.equals("UINT64")){ + fpdPcd.setMaxDatumSize(8); + } + if (dataType.equals("BOOLEAN")){ + fpdPcd.setMaxDatumSize(1); + } + if (dataType.equals("VOID*")) { + int maxSize = setMaxSizeForPointer(fpdPcd.getValue()); + fpdPcd.setMaxDatumSize(maxSize); + } if (itemType.equals("DYNAMIC") || itemType.equals("DYNAMIC_EX")) { ArrayList al = LookupDynamicPcdBuildDefinition(cName + " " + tsGuid); @@ -932,6 +951,7 @@ public class FpdFileContents { fpdPcd.setValue(""); } } + /* if (dataType.equals("UINT8")){ fpdPcd.setMaxDatumSize(1); } @@ -951,6 +971,7 @@ public class FpdFileContents { int maxSize = setMaxSizeForPointer(fpdPcd.getValue()); fpdPcd.setMaxDatumSize(maxSize); } + */ } } diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java index 36b22be6a4..56bebc5770 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java @@ -93,6 +93,7 @@ public class FpdModuleSA extends JDialog implements ActionListener { private DefaultTableModel optionsTableModel = null; private FpdFileContents ffc = null; private String moduleKey = null; + private int moduleSaNum = -1; private HashMap> classInstanceMap = null; private ArrayList classProduced = null; private HashMap> classConsumed = null; @@ -135,6 +136,7 @@ public class FpdModuleSA extends JDialog implements ActionListener { public void setKey(String k, int i, OpeningPlatformType dc){ this.moduleKey = k; + moduleSaNum = i; this.docConsole = dc; classProduced = null; classConsumed = null; @@ -196,14 +198,17 @@ public class FpdModuleSA extends JDialog implements ActionListener { // // display module SA options // + jTextFieldFvBinding.setText(""); String fvBinding = ffc.getFvBinding(key); if (fvBinding != null) { jTextFieldFvBinding.setText(fvBinding); } + jTextFieldFileGuid.setText(""); String fileGuid = ffc.getFfsFileNameGuid(key); if (fileGuid != null) { jTextFieldFileGuid.setText(fileGuid); } + jTextFieldFfsKey.setText(""); String ffsKey = ffc.getFfsFormatKey(key); if (ffsKey != null) { jTextFieldFfsKey.setText(ffsKey); @@ -471,7 +476,7 @@ public class FpdModuleSA extends JDialog implements ActionListener { jPanelPcd.add(getJPanelPcdSouth(), java.awt.BorderLayout.SOUTH); jPanelPcd.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent e) { -// initPcdBuildDefinition(moduleKey); + initPcdBuildDefinition(moduleSaNum); } }); @@ -1183,7 +1188,7 @@ public class FpdModuleSA extends JDialog implements ActionListener { private JTextField getJTextFieldFfsKey() { if (jTextFieldFfsKey == null) { jTextFieldFfsKey = new JTextField(); - jTextFieldFfsKey.setPreferredSize(new java.awt.Dimension(150,20)); + jTextFieldFfsKey.setPreferredSize(new java.awt.Dimension(250,20)); jTextFieldFfsKey.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent e) { String originalFfsKey = ffc.getFfsFormatKey(moduleKey);