summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-02 09:34:27 +0000
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>2006-08-02 09:34:27 +0000
commit802e005517d1c21865c5d50c0933abc8289ea5de (patch)
tree7e4222cb23a53658b8e4d05d546d426b9a41dd7d
parent1faac7b69fbddc4b1af451f51465988d8e1988c7 (diff)
downloadedk2-platforms-802e005517d1c21865c5d50c0933abc8289ea5de.tar.xz
set MaxDatumSize for PcdData.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1178 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java21
-rw-r--r--Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java9
2 files changed, 28 insertions, 2 deletions
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<String> 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<String, ArrayList<String>> classInstanceMap = null;
private ArrayList<String> classProduced = null;
private HashMap<String, ArrayList<String>> 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);