rearrange target of procedures of library instance selection.
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 29 Aug 2006 09:18:39 +0000 (09:18 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 29 Aug 2006 09:18:39 +0000 (09:18 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1402 6f19259b-4bc3-4df7-8a09-765794883524

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

index 07980d7ddba91714dce2c0b38be7760f519c3f4f..0897ac030beef0b583a77c230e0b55606975d60d 100644 (file)
@@ -631,25 +631,18 @@ public class FpdFileContents {
                 if (moduleSA.getPcdBuildDefinition() != null) {\r
                     XmlCursor cursor = moduleSA.getPcdBuildDefinition().newCursor();\r
                     if (cursor.toFirstChild()) {\r
-                        PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData pcdData = (PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData) cursor\r
-                                                                                                                                                      .getObject();\r
-                        if (msaPcd.getCName().equals(pcdData.getCName())\r
-                            && msaPcd.getTokenSpaceGuidCName().equals(pcdData.getTokenSpaceGuidCName())) {\r
-\r
-                            maintainDynPcdMap(pcdData.getCName() + " " + pcdData.getTokenSpaceGuidCName(), moduleKey);\r
-                            cursor.removeXml();\r
-                            break;\r
-                        }\r
-                        while (cursor.toNextSibling()) {\r
-                            pcdData = (PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData) cursor.getObject();\r
+                        do {\r
+                            PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData pcdData = (PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData) cursor\r
+                                                                                                                                                          .getObject();\r
                             if (msaPcd.getCName().equals(pcdData.getCName())\r
                                 && msaPcd.getTokenSpaceGuidCName().equals(pcdData.getTokenSpaceGuidCName())) {\r
+\r
                                 maintainDynPcdMap(pcdData.getCName() + " " + pcdData.getTokenSpaceGuidCName(),\r
                                                   moduleKey);\r
                                 cursor.removeXml();\r
                                 break;\r
                             }\r
-                        }\r
+                        } while (cursor.toNextSibling());\r
                     }\r
                     cursor.dispose();\r
                 }\r
index ef185b16f987533e221602e0788d61313c883d8f..b6c92d6c3e47e479f106975250ccb2890fd2f9a2 100644 (file)
@@ -192,10 +192,9 @@ public class FpdModuleSA extends JDialog implements ActionListener {
                     resolveLibraryInstances(saa[i][1] + " " + saa[i][2] + " " + saa[i][3] + " " + saa[i][4]);\r
                     selectedInstancesTableModel.addRow(saa[i]);\r
                 }\r
-                \r
-                \r
             }\r
         }\r
+        showClassToResolved();\r
     }\r
     \r
     public void initFvInfo (String key) {\r
@@ -286,7 +285,7 @@ public class FpdModuleSA extends JDialog implements ActionListener {
                 \r
             }\r
             \r
-            showClassToResolved();\r
+//            showClassToResolved();\r
         }\r
         catch(Exception e) {\r
             e.printStackTrace();\r
@@ -418,6 +417,21 @@ public class FpdModuleSA extends JDialog implements ActionListener {
         }\r
         libInstanceTableModel.setRowCount(0);\r
     }\r
+    \r
+    private void addLibInstance (ModuleIdentification libMi) {\r
+        \r
+        ffc.genLibraryInstance(libMi, moduleKey);\r
+        //\r
+        // Add pcd information of selected instance to current moduleSA\r
+        //\r
+        try{\r
+            ffc.addFrameworkModulesPcdBuildDefs(libMi, null, ffc.getModuleSA(moduleKey));\r
+        }\r
+        catch (Exception exception) {\r
+            JOptionPane.showMessageDialog(frame, "Adding Instance" + libMi.getName() + ": "+ exception.getMessage());\r
+        }\r
+        \r
+    }\r
     /**\r
      * This method initializes this\r
      * \r
@@ -994,17 +1008,9 @@ public class FpdModuleSA extends JDialog implements ActionListener {
                     libInstanceTableModel.getValueAt(row, 3) + " " +\r
                     libInstanceTableModel.getValueAt(row, 4);\r
                     ModuleIdentification libMi = WorkspaceProfile.getModuleId(instanceValue);\r
-                    ffc.genLibraryInstance(libMi, moduleKey);\r
-                    //\r
-                    // Add pcd information of selected instance to current moduleSA\r
-                    //\r
-                    try{\r
-                        ffc.addFrameworkModulesPcdBuildDefs(libMi, null, ffc.getModuleSA(moduleKey));\r
-                    }\r
-                    catch (Exception exception) {\r
-                        JOptionPane.showMessageDialog(frame, "Adding Instance" + s[0] + ": "+ exception.getMessage());\r
-                    }\r
+                    addLibInstance (libMi);\r
                     resolveLibraryInstances(instanceValue);\r
+                    showClassToResolved();\r
                 }\r
             });\r
         }\r