diff options
author | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-11 06:57:08 +0000 |
---|---|---|
committer | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-11 06:57:08 +0000 |
commit | 5f480cb5e8d562cd44d5d87472d0100b8842ba5e (patch) | |
tree | ac1dae212c713c9b4fba971ede958ceec01cdd60 | |
parent | 91a1f0d7ac1e62fb578d645c546c9c12e81f5fe2 (diff) | |
download | edk2-platforms-5f480cb5e8d562cd44d5d87472d0100b8842ba5e.tar.xz |
Ensure the validity of Ffs Sections when adding a new Sections to Ffs.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1721 6f19259b-4bc3-4df7-8a09-765794883524
2 files changed, 19 insertions, 10 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java index 03a4ed5f98..dae2aed050 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdBuildOptions.java @@ -625,6 +625,10 @@ public class FpdBuildOptions extends IInternalFrame { docConsole.setSaved(false);
ffc.removeBuildOptionsFfs(jTableFfs.getSelectedRow());
ffsTableModel.removeRow(jTableFfs.getSelectedRow());
+ sectionTableModel.setRowCount(0);
+ sectionsTableModel.setRowCount(0);
+ subsectionsTableModel.setRowCount(0);
+ ffsAttributesTableModel.setRowCount(0);
}
});
}
@@ -1164,6 +1168,7 @@ public class FpdBuildOptions extends IInternalFrame { sectionsTableModel.removeRow(jTableFfsSections.getSelectedRow());
ffc.removeBuildOptionsFfsSectionsSections(jTableFfs.getSelectedRow(),
jTableFfsSections.getSelectedRow());
+ subsectionsTableModel.setRowCount(0);
}
});
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java index 1acb42e991..5f4e0b522e 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java @@ -115,8 +115,8 @@ public class FpdFileContents { if (moduleSa.getPcdBuildDefinition() == null || moduleSa.getPcdBuildDefinition().getPcdDataList() == null) {
continue;
}
- String ModuleInfo = moduleSa.getModuleGuid() + " " + moduleSa.getModuleVersion() +
- " " + moduleSa.getPackageGuid() + " " + moduleSa.getPackageVersion() + " " + listToString(moduleSa.getSupArchList());
+ String ModuleInfo = moduleSa.getModuleGuid().toLowerCase() + " " + moduleSa.getModuleVersion() +
+ " " + moduleSa.getPackageGuid().toLowerCase() + " " + moduleSa.getPackageVersion() + " " + listToString(moduleSa.getSupArchList());
List<PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData> lp = moduleSa.getPcdBuildDefinition().getPcdDataList();
ListIterator<PcdBuildDefinitionDocument.PcdBuildDefinition.PcdData> lpi = lp.listIterator();
while (lpi.hasNext()) {
@@ -374,8 +374,10 @@ public class FpdFileContents { cursor.pop();
cursor.removeXml();
if (getFrameworkModulesCount() == 0) {
- cursor.toParent();
- cursor.removeXml();
+ cursor.dispose();
+ removeElement(getfpdFrameworkModules());
+ fpdFrameworkModules = null;
+ return;
}
}
cursor.dispose();
@@ -478,7 +480,7 @@ public class FpdFileContents { String[] s = moduleInfo.split(" ");
for(int i = 0; i < al.size(); ++i){
String consumer = al.get(i);
- if (consumer.contains(s[0]) && consumer.contains(s[2])){
+ if (consumer.contains(s[0].toLowerCase()) && consumer.contains(s[2].toLowerCase())){
String[] consumerPart = consumer.split(" ");
if (!consumerPart[4].equals(s[4])) {
continue;
@@ -2372,7 +2374,9 @@ public class FpdFileContents { if (sections == null){
sections = ffs.addNewSections();
}
- sections.addNewSections().setEncapsulationType(encapType);
+ BuildOptionsDocument.BuildOptions.Ffs.Sections.Sections2 sections2 = sections.addNewSections();
+ sections2.setEncapsulationType(encapType);
+ sections2.addNewSection().setSectionType(EfiSectionType.Enum.forString("EFI_SECTION_PE32"));
}
public void removeBuildOptionsFfsSectionsSections(int i, int j) {
@@ -2498,9 +2502,9 @@ public class FpdFileContents { ListIterator<BuildOptionsDocument.BuildOptions.Ffs.Sections.Sections2.Section> li = sections2.getSectionList().listIterator();
while(li.hasNext()) {
BuildOptionsDocument.BuildOptions.Ffs.Sections.Sections2.Section section = li.next();
- if (section.isSetSectionType()) {
- al.add(section.getSectionType().toString());
- }
+// if (section.isSetSectionType()) {
+ al.add(section.getSectionType()+"");
+// }
}
}
@@ -2549,7 +2553,7 @@ public class FpdFileContents { if (ffs.getSections().getSectionList() != null){
ListIterator<BuildOptionsDocument.BuildOptions.Ffs.Sections.Section> li = ffs.getSections().getSectionList().listIterator();
while (li.hasNext()) {
- firstLevelSection.add(li.next().getSectionType().toString());
+ firstLevelSection.add(li.next().getSectionType()+"");
}
}
if (ffs.getSections().getSectionsList() != null) {
|