fix EDKT189.

and remove FFS file Guid text field from ModuleSaOptions pane.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1298 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jlin16 2006-08-16 17:37:34 +00:00
parent bd4814401e
commit d96d701f98
2 changed files with 38 additions and 11 deletions

View File

@ -344,14 +344,35 @@ public class FpdFrameworkModules extends IInternalFrame {
String mType = mi.getModuleType();
ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);
if (al == null) {
//
// if existing ModuleSA does not specify version info.
//
al = fpdMsa.get(mg + "null" + pg + "null");
if (al == null) {
al = fpdMsa.get(mg + "null" + pg + pv);
if (al == null){
al = fpdMsa.get(mg + mv + pg + "null");
if (al == null) {
al = new ArrayList<String>();
fpdMsa.put(mg + mv + pg + pv, al);
}
}
}
}
//
// filter from module SupArchs what archs has been added.
//
for (int i = 0; i < al.size(); ++i) {
vArchs.remove(al.get(i));
}
//
// check whether archs conform to SupArch of platform.
//
Vector<Object> platformSupArch = new Vector<Object>();
ffc.getPlatformDefsSupportedArchs(platformSupArch);
vArchs.retainAll(platformSupArch);
//
// Archs this Module supported have already been added.
//
if (vArchs.size() == 0) {
@ -574,6 +595,7 @@ public class FpdFrameworkModules extends IInternalFrame {
if (arch == null) {
// if no arch specified in ModuleSA
fpdMsa.remove(mg + mv + pg + pv);
} else {
ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);
al.remove(arch);
@ -648,7 +670,7 @@ public class FpdFrameworkModules extends IInternalFrame {
row[typeColForFpdModTable] = mi.getModuleType();
row[pkgNameColForFpdModTable] = mi.getPackage().getName();
row[pkgVerColForFpdModTable] = mi.getPackage().getVersion();
row[archColForFpdModTable] = saa[i][4];
row[archColForFpdModTable] = saa[i][ffcModArch];
try {
row[pathColForFpdModTable] = GlobalData.getMsaFile(mi).getPath().substring(
System.getenv("WORKSPACE")
@ -656,15 +678,18 @@ public class FpdFrameworkModules extends IInternalFrame {
} catch (Exception e) {
JOptionPane.showMessageDialog(frame, "Show FPD Modules:" + e.getMessage());
}
}
modelFpdModules.addRow(row);
ArrayList<String> al = fpdMsa.get(saa[i][ffcModGuid] + saa[i][ffcModVer]
+ saa[i][ffcPkgGuid] + saa[i][ffcPkgVer]);
String fpdMsaKey = saa[i][ffcModGuid] + row[modVerColForFpdModTable]
+ saa[i][ffcPkgGuid] + row[pkgVerColForFpdModTable];
ArrayList<String> al = fpdMsa.get(fpdMsaKey);
if (al == null) {
al = new ArrayList<String>();
fpdMsa.put(saa[i][ffcModGuid] + saa[i][ffcModVer] + saa[i][ffcPkgGuid] + saa[i][ffcPkgVer], al);
fpdMsa.put(fpdMsaKey, al);
}
al.add(saa[i][ffcModArch]);
}
}
TableSorter sorter = (TableSorter)jTableFpdModules.getModel();

View File

@ -1086,6 +1086,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
jLabelFfsFileGuid = new JLabel();
jLabelFfsFileGuid.setText("FFS File GUID");
jLabelFfsFileGuid.setPreferredSize(new java.awt.Dimension(90,16));
jLabelFfsFileGuid.setVisible(false);
jLabelFvBinding = new JLabel();
jLabelFvBinding.setText("FV Binding");
jLabelFvBinding.setPreferredSize(new java.awt.Dimension(90,16));
@ -1145,6 +1146,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
if (jTextFieldFileGuid == null) {
jTextFieldFileGuid = new JTextField();
jTextFieldFileGuid.setPreferredSize(new java.awt.Dimension(300,20));
jTextFieldFileGuid.setVisible(false);
jTextFieldFileGuid.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent e) {
String originalFileGuid = ffc.getFfsFileNameGuid(moduleKey);