]> git.proxmox.com Git - mirror_edk2.git/commitdiff
fix EDKT189.
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 16 Aug 2006 17:37:34 +0000 (17:37 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 16 Aug 2006 17:37:34 +0000 (17:37 +0000)
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

Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java
Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java

index 0a15d3188a427f2bb83678daf71f4bf24c972abe..ee0a1e645c9120478fdfc47b43264bf560afc257 100644 (file)
@@ -345,13 +345,34 @@ public class FpdFrameworkModules extends IInternalFrame {
 \r
                     ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);\r
                     if (al == null) {\r
-                        al = new ArrayList<String>();\r
-                        fpdMsa.put(mg + mv + pg + pv, al);\r
+                        //\r
+                        // if existing ModuleSA does not specify version info.\r
+                        //\r
+                        al = fpdMsa.get(mg + "null" + pg + "null");\r
+                        if (al == null) {\r
+                            al = fpdMsa.get(mg + "null" + pg + pv);\r
+                            if (al == null){\r
+                                al = fpdMsa.get(mg + mv + pg + "null");\r
+                                if (al == null) {\r
+                                    al = new ArrayList<String>();\r
+                                    fpdMsa.put(mg + mv + pg + pv, al);    \r
+                                }\r
+                            }\r
+                        }\r
                     }\r
+                    //\r
+                    // filter from module SupArchs what archs has been added.\r
+                    //\r
                     for (int i = 0; i < al.size(); ++i) {\r
                         vArchs.remove(al.get(i));\r
                     }\r
                     //\r
+                    // check whether archs conform to SupArch of platform.\r
+                    //\r
+                    Vector<Object> platformSupArch = new Vector<Object>();\r
+                    ffc.getPlatformDefsSupportedArchs(platformSupArch);\r
+                    vArchs.retainAll(platformSupArch);\r
+                    //\r
                     // Archs this Module supported have already been added.\r
                     //\r
                     if (vArchs.size() == 0) {\r
@@ -574,6 +595,7 @@ public class FpdFrameworkModules extends IInternalFrame {
                     if (arch == null) {\r
                         // if no arch specified in ModuleSA\r
                         fpdMsa.remove(mg + mv + pg + pv);\r
+                        \r
                     } else {\r
                         ArrayList<String> al = fpdMsa.get(mg + mv + pg + pv);\r
                         al.remove(arch);\r
@@ -648,7 +670,7 @@ public class FpdFrameworkModules extends IInternalFrame {
                     row[typeColForFpdModTable] = mi.getModuleType();\r
                     row[pkgNameColForFpdModTable] = mi.getPackage().getName();\r
                     row[pkgVerColForFpdModTable] = mi.getPackage().getVersion();\r
-                    row[archColForFpdModTable] = saa[i][4];\r
+                    row[archColForFpdModTable] = saa[i][ffcModArch];\r
                     try {\r
                         row[pathColForFpdModTable] = GlobalData.getMsaFile(mi).getPath().substring(\r
                                                                                       System.getenv("WORKSPACE")\r
@@ -656,15 +678,18 @@ public class FpdFrameworkModules extends IInternalFrame {
                     } catch (Exception e) {\r
                         JOptionPane.showMessageDialog(frame, "Show FPD Modules:" + e.getMessage());\r
                     }\r
+                    \r
+                    modelFpdModules.addRow(row);\r
+                    String fpdMsaKey = saa[i][ffcModGuid] + row[modVerColForFpdModTable]\r
+                                                                + saa[i][ffcPkgGuid] + row[pkgVerColForFpdModTable];\r
+                    ArrayList<String> al = fpdMsa.get(fpdMsaKey);\r
+                    if (al == null) {\r
+                        al = new ArrayList<String>();\r
+                        fpdMsa.put(fpdMsaKey, al);\r
+                    }\r
+                    al.add(saa[i][ffcModArch]);\r
                 }\r
-                modelFpdModules.addRow(row);\r
-                ArrayList<String> al = fpdMsa.get(saa[i][ffcModGuid] + saa[i][ffcModVer]\r
-                                                  + saa[i][ffcPkgGuid] + saa[i][ffcPkgVer]);\r
-                if (al == null) {\r
-                    al = new ArrayList<String>();\r
-                    fpdMsa.put(saa[i][ffcModGuid] + saa[i][ffcModVer] + saa[i][ffcPkgGuid] + saa[i][ffcPkgVer], al);\r
-                }\r
-                al.add(saa[i][ffcModArch]);\r
+                \r
 \r
             }\r
             TableSorter sorter = (TableSorter)jTableFpdModules.getModel();\r
index 0ab921b74e4da331a3754209e96be6b6f758b78c..27533b41376a31eef5076bf9d2685ece72accef0 100644 (file)
@@ -1086,6 +1086,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
             jLabelFfsFileGuid = new JLabel();\r
             jLabelFfsFileGuid.setText("FFS File GUID");\r
             jLabelFfsFileGuid.setPreferredSize(new java.awt.Dimension(90,16));\r
+            jLabelFfsFileGuid.setVisible(false);\r
             jLabelFvBinding = new JLabel();\r
             jLabelFvBinding.setText("FV Binding");\r
             jLabelFvBinding.setPreferredSize(new java.awt.Dimension(90,16));\r
@@ -1145,6 +1146,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
         if (jTextFieldFileGuid == null) {\r
             jTextFieldFileGuid = new JTextField();\r
             jTextFieldFileGuid.setPreferredSize(new java.awt.Dimension(300,20));\r
+            jTextFieldFileGuid.setVisible(false);\r
             jTextFieldFileGuid.addFocusListener(new java.awt.event.FocusAdapter() {\r
                 public void focusLost(java.awt.event.FocusEvent e) {\r
                     String originalFileGuid = ffc.getFfsFileNameGuid(moduleKey);\r