mirror of https://github.com/acidanthera/audk.git
add calculation for max. datum size based on pcd default value input by user.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1763 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c5986ece67
commit
98aee6e933
|
@ -591,9 +591,9 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
||||||
jComboBoxItemType.setSelectedItem(itemType);
|
jComboBoxItemType.setSelectedItem(itemType);
|
||||||
jTextFieldMaxDatumSize.setEnabled(true);
|
jTextFieldMaxDatumSize.setEnabled(true);
|
||||||
jTextFieldMaxDatumSize.setVisible(true);
|
jTextFieldMaxDatumSize.setVisible(true);
|
||||||
jTextFieldMaxDatumSize.setText(jTablePcd.getValueAt(selectedRow, 4)+"");
|
jTextFieldMaxDatumSize.setText(model.getValueAt(selectedRow, 4)+"");
|
||||||
jTextFieldPcdDefault.setEnabled(true);
|
jTextFieldPcdDefault.setEnabled(true);
|
||||||
jTextFieldPcdDefault.setText(jTablePcd.getValueAt(selectedRow, 6)+"");
|
jTextFieldPcdDefault.setText(model.getValueAt(selectedRow, 6)+"");
|
||||||
if (model.getValueAt(selectedRow, 5).equals("VOID*")) {
|
if (model.getValueAt(selectedRow, 5).equals("VOID*")) {
|
||||||
if (pcdInfo[1].equals("FEATURE_FLAG")) {
|
if (pcdInfo[1].equals("FEATURE_FLAG")) {
|
||||||
jTextFieldMaxDatumSize.setVisible(false);
|
jTextFieldMaxDatumSize.setVisible(false);
|
||||||
|
@ -601,14 +601,14 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
||||||
else if (pcdInfo[1].equals("FIXED_AT_BUILD")) {
|
else if (pcdInfo[1].equals("FIXED_AT_BUILD")) {
|
||||||
try{
|
try{
|
||||||
jTextFieldMaxDatumSize.setEnabled(false);
|
jTextFieldMaxDatumSize.setEnabled(false);
|
||||||
jTextFieldMaxDatumSize.setText(ffc.setMaxSizeForPointer(jTablePcd.getValueAt(selectedRow, 6)+"")+"");
|
jTextFieldMaxDatumSize.setText(ffc.setMaxSizeForPointer(model.getValueAt(selectedRow, 6)+"")+"");
|
||||||
}
|
}
|
||||||
catch(Exception except){
|
catch(Exception except){
|
||||||
JOptionPane.showMessageDialog(frame, "Unacceptable PCD Value: " + except.getMessage());
|
JOptionPane.showMessageDialog(frame, "Unacceptable PCD Value: " + except.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
jTextFieldMaxDatumSize.setText(jTablePcd.getValueAt(selectedRow, 4)+"");
|
jTextFieldMaxDatumSize.setText(model.getValueAt(selectedRow, 4)+"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -653,6 +653,11 @@ public class FpdModuleSA extends JDialog implements ActionListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param cName
|
||||||
|
* @param tsGuid
|
||||||
|
* @param sa sa[0]: HelpText; sa[1]: itemType in Msa; sa[2]: isBinary;
|
||||||
|
*/
|
||||||
private void getPcdInfo(String cName, String tsGuid, String[] sa) {
|
private void getPcdInfo(String cName, String tsGuid, String[] sa) {
|
||||||
String[][] saa = new String[ffc.getLibraryInstancesCount(moduleKey)][5];
|
String[][] saa = new String[ffc.getLibraryInstancesCount(moduleKey)][5];
|
||||||
ffc.getLibraryInstances(moduleKey, saa);
|
ffc.getLibraryInstances(moduleKey, saa);
|
||||||
|
@ -1594,8 +1599,21 @@ private JButton getJButtonUpdatePcd() {
|
||||||
String oldItemType = model.getValueAt(row, 2)+"";
|
String oldItemType = model.getValueAt(row, 2)+"";
|
||||||
String newItemType = jComboBoxItemType.getSelectedItem()+"";
|
String newItemType = jComboBoxItemType.getSelectedItem()+"";
|
||||||
model.setValueAt(newItemType, row, 2);
|
model.setValueAt(newItemType, row, 2);
|
||||||
model.setValueAt(jTextFieldMaxDatumSize.getText(), row, 4);
|
|
||||||
model.setValueAt(jTextFieldPcdDefault.isVisible()? jTextFieldPcdDefault.getText():jComboBoxFeatureFlagValue.getSelectedItem(), row, 6);
|
model.setValueAt(jTextFieldPcdDefault.isVisible()? jTextFieldPcdDefault.getText():jComboBoxFeatureFlagValue.getSelectedItem(), row, 6);
|
||||||
|
|
||||||
|
String[] pcdInfo = {"", "", ""};
|
||||||
|
getPcdInfo (model.getValueAt(row, 0)+"", model.getValueAt(row, 1)+"", pcdInfo);
|
||||||
|
if (pcdInfo[1].equals("FIXED_AT_BUILD") && model.getValueAt(row, 5).equals("VOID*")) {
|
||||||
|
try {
|
||||||
|
jTextFieldMaxDatumSize.setText(ffc.setMaxSizeForPointer(model.getValueAt(row, 6)+"")+"");
|
||||||
|
}
|
||||||
|
catch (Exception exp) {
|
||||||
|
JOptionPane.showMessageDialog(frame, "PCD Value MalFormed: " + exp.getMessage());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
model.setValueAt(jTextFieldMaxDatumSize.getText(), row, 4);
|
||||||
|
|
||||||
if (oldItemType.equals("DYNAMIC") && !newItemType.equals("DYNAMIC")) {
|
if (oldItemType.equals("DYNAMIC") && !newItemType.equals("DYNAMIC")) {
|
||||||
pcdDynamicToNonDynamic(model.getValueAt(row, 0)+"", model.getValueAt(row, 1)+"");
|
pcdDynamicToNonDynamic(model.getValueAt(row, 0)+"", model.getValueAt(row, 1)+"");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue