]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Ensure the validity of Ffs Sections when adding a new Sections to Ffs.
authorjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 11 Oct 2006 06:57:08 +0000 (06:57 +0000)
committerjlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 11 Oct 2006 06:57:08 +0000 (06:57 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1721 6f19259b-4bc3-4df7-8a09-765794883524

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

index 03a4ed5f98d59e1e5fc4bd801ac2ad7e7342dba6..dae2aed050218f2895551708dbcb5c8873f01572 100644 (file)
@@ -625,6 +625,10 @@ public class FpdBuildOptions extends IInternalFrame {
                     docConsole.setSaved(false);\r
                     ffc.removeBuildOptionsFfs(jTableFfs.getSelectedRow());\r
                     ffsTableModel.removeRow(jTableFfs.getSelectedRow());\r
+                    sectionTableModel.setRowCount(0);\r
+                    sectionsTableModel.setRowCount(0);\r
+                    subsectionsTableModel.setRowCount(0);\r
+                    ffsAttributesTableModel.setRowCount(0);\r
                 }\r
             });\r
         }\r
@@ -1164,6 +1168,7 @@ public class FpdBuildOptions extends IInternalFrame {
                     sectionsTableModel.removeRow(jTableFfsSections.getSelectedRow());\r
                     ffc.removeBuildOptionsFfsSectionsSections(jTableFfs.getSelectedRow(),\r
                                                               jTableFfsSections.getSelectedRow());\r
+                    subsectionsTableModel.setRowCount(0);\r
                 }\r
             });\r
         }\r
index 1acb42e991a7b240ff9d1ac7db282a80eee54a67..5f4e0b522eeb17e69ae43a7175400f97f80abcd4 100644 (file)
@@ -115,8 +115,8 @@ public class FpdFileContents {
               if (moduleSa.getPcdBuildDefinition() == null || moduleSa.getPcdBuildDefinition().getPcdDataList() == null) {\r
                   continue;\r
               }\r
-              String ModuleInfo = moduleSa.getModuleGuid() + " " + moduleSa.getModuleVersion() +\r
-               " " + moduleSa.getPackageGuid() + " " + moduleSa.getPackageVersion() + " " + listToString(moduleSa.getSupArchList());\r
+              String ModuleInfo = moduleSa.getModuleGuid().toLowerCase() + " " + moduleSa.getModuleVersion() +\r
+               " " + moduleSa.getPackageGuid().toLowerCase() + " " + moduleSa.getPackageVersion() + " " + listToString(moduleSa.getSupArchList());\r
               List<PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData> lp = moduleSa.getPcdBuildDefinition().getPcdDataList();\r
               ListIterator<PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData> lpi = lp.listIterator();\r
               while (lpi.hasNext()) {\r
@@ -374,8 +374,10 @@ public class FpdFileContents {
             cursor.pop();\r
             cursor.removeXml();\r
             if (getFrameworkModulesCount() == 0) {\r
-                cursor.toParent();\r
-                cursor.removeXml();\r
+                cursor.dispose();\r
+                removeElement(getfpdFrameworkModules());\r
+                fpdFrameworkModules = null;\r
+                return;\r
             }\r
         }\r
         cursor.dispose();\r
@@ -478,7 +480,7 @@ public class FpdFileContents {
         String[] s = moduleInfo.split(" ");\r
         for(int i = 0; i < al.size(); ++i){\r
             String consumer = al.get(i);\r
-            if (consumer.contains(s[0]) && consumer.contains(s[2])){\r
+            if (consumer.contains(s[0].toLowerCase()) && consumer.contains(s[2].toLowerCase())){\r
                 String[] consumerPart = consumer.split(" ");\r
                 if (!consumerPart[4].equals(s[4])) {\r
                     continue;\r
@@ -2372,7 +2374,9 @@ public class FpdFileContents {
         if (sections == null){\r
             sections = ffs.addNewSections();\r
         }\r
-        sections.addNewSections().setEncapsulationType(encapType);\r
+        BuildOptionsDocument.BuildOptions.Ffs.Sections.Sections2 sections2 = sections.addNewSections();\r
+        sections2.setEncapsulationType(encapType);\r
+        sections2.addNewSection().setSectionType(EfiSectionType.Enum.forString("EFI_SECTION_PE32"));\r
     }\r
     \r
     public void removeBuildOptionsFfsSectionsSections(int i, int j) {\r
@@ -2498,9 +2502,9 @@ public class FpdFileContents {
             ListIterator<BuildOptionsDocument.BuildOptions.Ffs.Sections.Sections2.Section> li = sections2.getSectionList().listIterator();\r
             while(li.hasNext()) {\r
                 BuildOptionsDocument.BuildOptions.Ffs.Sections.Sections2.Section section = li.next();\r
-                if (section.isSetSectionType()) {\r
-                    al.add(section.getSectionType().toString());\r
-                }\r
+//                if (section.isSetSectionType()) {\r
+                    al.add(section.getSectionType()+"");\r
+//                }\r
                 \r
             }\r
         }\r
@@ -2549,7 +2553,7 @@ public class FpdFileContents {
                 if (ffs.getSections().getSectionList() != null){\r
                     ListIterator<BuildOptionsDocument.BuildOptions.Ffs.Sections.Section> li = ffs.getSections().getSectionList().listIterator();\r
                     while (li.hasNext()) {\r
-                        firstLevelSection.add(li.next().getSectionType().toString());\r
+                        firstLevelSection.add(li.next().getSectionType()+"");\r
                     }\r
                 }\r
                 if (ffs.getSections().getSectionsList() != null) {\r