From: jlin16 Date: Wed, 16 Aug 2006 17:37:34 +0000 (+0000) Subject: fix EDKT189. X-Git-Tag: edk2-stable201903~24575 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=d96d701f982eb36010ab7c4da8cf15ddfbd5f136 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 --- diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java index 0a15d3188a..ee0a1e645c 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java @@ -345,13 +345,34 @@ public class FpdFrameworkModules extends IInternalFrame { ArrayList al = fpdMsa.get(mg + mv + pg + pv); if (al == null) { - al = new ArrayList(); - fpdMsa.put(mg + mv + pg + pv, al); + // + // 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(); + 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 platformSupArch = new Vector(); + 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 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); + String fpdMsaKey = saa[i][ffcModGuid] + row[modVerColForFpdModTable] + + saa[i][ffcPkgGuid] + row[pkgVerColForFpdModTable]; + ArrayList al = fpdMsa.get(fpdMsaKey); + if (al == null) { + al = new ArrayList(); + fpdMsa.put(fpdMsaKey, al); + } + al.add(saa[i][ffcModArch]); } - modelFpdModules.addRow(row); - ArrayList al = fpdMsa.get(saa[i][ffcModGuid] + saa[i][ffcModVer] - + saa[i][ffcPkgGuid] + saa[i][ffcPkgVer]); - if (al == null) { - al = new ArrayList(); - fpdMsa.put(saa[i][ffcModGuid] + saa[i][ffcModVer] + saa[i][ffcPkgGuid] + saa[i][ffcPkgVer], al); - } - al.add(saa[i][ffcModArch]); + } TableSorter sorter = (TableSorter)jTableFpdModules.getModel(); 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 0ab921b74e..27533b4137 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 @@ -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);