set MaxDatumSize for PcdData.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1178 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1faac7b69f
commit
802e005517
|
@ -906,6 +906,25 @@ public class FpdFileContents {
|
||||||
fpdPcd.setTokenSpaceGuidCName(tsGuid);
|
fpdPcd.setTokenSpaceGuidCName(tsGuid);
|
||||||
fpdPcd.setDatumType(PcdDataTypes.Enum.forString(dataType));
|
fpdPcd.setDatumType(PcdDataTypes.Enum.forString(dataType));
|
||||||
fpdPcd.setItemType(PcdItemTypes.Enum.forString(itemType));
|
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")) {
|
if (itemType.equals("DYNAMIC") || itemType.equals("DYNAMIC_EX")) {
|
||||||
ArrayList<String> al = LookupDynamicPcdBuildDefinition(cName + " " + tsGuid);
|
ArrayList<String> al = LookupDynamicPcdBuildDefinition(cName + " " + tsGuid);
|
||||||
|
@ -932,6 +951,7 @@ public class FpdFileContents {
|
||||||
fpdPcd.setValue("");
|
fpdPcd.setValue("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (dataType.equals("UINT8")){
|
if (dataType.equals("UINT8")){
|
||||||
fpdPcd.setMaxDatumSize(1);
|
fpdPcd.setMaxDatumSize(1);
|
||||||
}
|
}
|
||||||
|
@ -951,6 +971,7 @@ public class FpdFileContents {
|
||||||
int maxSize = setMaxSizeForPointer(fpdPcd.getValue());
|
int maxSize = setMaxSizeForPointer(fpdPcd.getValue());
|
||||||
fpdPcd.setMaxDatumSize(maxSize);
|
fpdPcd.setMaxDatumSize(maxSize);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
||||||
private DefaultTableModel optionsTableModel = null;
|
private DefaultTableModel optionsTableModel = null;
|
||||||
private FpdFileContents ffc = null;
|
private FpdFileContents ffc = null;
|
||||||
private String moduleKey = null;
|
private String moduleKey = null;
|
||||||
|
private int moduleSaNum = -1;
|
||||||
private HashMap<String, ArrayList<String>> classInstanceMap = null;
|
private HashMap<String, ArrayList<String>> classInstanceMap = null;
|
||||||
private ArrayList<String> classProduced = null;
|
private ArrayList<String> classProduced = null;
|
||||||
private HashMap<String, ArrayList<String>> classConsumed = 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){
|
public void setKey(String k, int i, OpeningPlatformType dc){
|
||||||
this.moduleKey = k;
|
this.moduleKey = k;
|
||||||
|
moduleSaNum = i;
|
||||||
this.docConsole = dc;
|
this.docConsole = dc;
|
||||||
classProduced = null;
|
classProduced = null;
|
||||||
classConsumed = null;
|
classConsumed = null;
|
||||||
|
@ -196,14 +198,17 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
||||||
//
|
//
|
||||||
// display module SA options
|
// display module SA options
|
||||||
//
|
//
|
||||||
|
jTextFieldFvBinding.setText("");
|
||||||
String fvBinding = ffc.getFvBinding(key);
|
String fvBinding = ffc.getFvBinding(key);
|
||||||
if (fvBinding != null) {
|
if (fvBinding != null) {
|
||||||
jTextFieldFvBinding.setText(fvBinding);
|
jTextFieldFvBinding.setText(fvBinding);
|
||||||
}
|
}
|
||||||
|
jTextFieldFileGuid.setText("");
|
||||||
String fileGuid = ffc.getFfsFileNameGuid(key);
|
String fileGuid = ffc.getFfsFileNameGuid(key);
|
||||||
if (fileGuid != null) {
|
if (fileGuid != null) {
|
||||||
jTextFieldFileGuid.setText(fileGuid);
|
jTextFieldFileGuid.setText(fileGuid);
|
||||||
}
|
}
|
||||||
|
jTextFieldFfsKey.setText("");
|
||||||
String ffsKey = ffc.getFfsFormatKey(key);
|
String ffsKey = ffc.getFfsFormatKey(key);
|
||||||
if (ffsKey != null) {
|
if (ffsKey != null) {
|
||||||
jTextFieldFfsKey.setText(ffsKey);
|
jTextFieldFfsKey.setText(ffsKey);
|
||||||
|
@ -471,7 +476,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
||||||
jPanelPcd.add(getJPanelPcdSouth(), java.awt.BorderLayout.SOUTH);
|
jPanelPcd.add(getJPanelPcdSouth(), java.awt.BorderLayout.SOUTH);
|
||||||
jPanelPcd.addComponentListener(new java.awt.event.ComponentAdapter() {
|
jPanelPcd.addComponentListener(new java.awt.event.ComponentAdapter() {
|
||||||
public void componentShown(java.awt.event.ComponentEvent e) {
|
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() {
|
private JTextField getJTextFieldFfsKey() {
|
||||||
if (jTextFieldFfsKey == null) {
|
if (jTextFieldFfsKey == null) {
|
||||||
jTextFieldFfsKey = new JTextField();
|
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() {
|
jTextFieldFfsKey.addFocusListener(new java.awt.event.FocusAdapter() {
|
||||||
public void focusLost(java.awt.event.FocusEvent e) {
|
public void focusLost(java.awt.event.FocusEvent e) {
|
||||||
String originalFfsKey = ffc.getFfsFormatKey(moduleKey);
|
String originalFfsKey = ffc.getFfsFormatKey(moduleKey);
|
||||||
|
|
Loading…
Reference in New Issue