X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FJava%2FSource%2FFrameworkWizard%2Fsrc%2Forg%2Ftianocore%2Fframeworkwizard%2Fplatform%2Fui%2FFpdFileContents.java;h=d8dfb279ba59f2228a4fce57ceb13b79fb57ad91;hp=67b7ad8c3c63a7cb4792df64b81e263427cc9614;hb=ceea362ed6c5e41ce78fbf8b9da8428c7f794136;hpb=85d9e5b10de1b5eee480a55211e31cc2e0fb8d3a 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 67b7ad8c3c..d8dfb279ba 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 @@ -427,7 +427,7 @@ public class FpdFileContents { if (nextMi == null) { continue; } - if (WorkspaceProfile.pcdInMsa(saaModuleSaPcd[i][0], saaModuleSaPcd[i][1], nextMi)) { + if (WorkspaceProfile.pcdInMsa(saaModuleSaPcd[i][0], saaModuleSaPcd[i][1], arch, nextMi)) { continue nextPcd; } } @@ -455,6 +455,13 @@ public class FpdFileContents { } } } + // Check sup arch conformance for the new PCD + if (msaPcd.getSupArchList() != null) { + String newPcdArch = msaPcd.getSupArchList().toString(); + if (!newPcdArch.toLowerCase().contains(arch.toLowerCase())) { + continue; + } + } PackageIdentification[] depPkgs = SurfaceAreaQuery.getDependencePkg(null, vMi.get(i)); PcdDeclarationsDocument.PcdDeclarations.PcdEntry spdPcd = LookupPcdDeclaration(msaPcd, depPkgs); @@ -686,7 +693,7 @@ public class FpdFileContents { int pcdSourceCount = 0; for (int i = 0; i < vMi.size(); ++i) { - if (WorkspaceProfile.pcdInMsa(cName, tsGuidCName, vMi.get(i))) { + if (WorkspaceProfile.pcdInMsa(cName, tsGuidCName, null, vMi.get(i))) { pcdSourceCount++; } } @@ -1179,12 +1186,17 @@ public class FpdFileContents { ListIterator li = l.listIterator(); while (li.hasNext()) { PcdCodedDocument.PcdCoded.PcdEntry msaPcd = (PcdCodedDocument.PcdCoded.PcdEntry) li.next(); + if (msaPcd.getSupArchList() != null) { + if (!msaPcd.getSupArchList().toString().toLowerCase().contains(arch.toLowerCase())) { + continue; + } + } PcdDeclarationsDocument.PcdDeclarations.PcdEntry spdPcd = LookupPcdDeclaration(msaPcd, depPkgs); if (spdPcd == null) { // // ToDo Error // - throw new PcdDeclNotFound("No Declaration for PCD Entry " + msaPcd.getCName() + " used by Module " + throw new PcdDeclNotFound("No Declaration for PCD Entry " + msaPcd.getCName() + "\n used by Module " + mi.getName() + " or its Library Instances."); } // @@ -1824,7 +1836,7 @@ public class FpdFileContents { UserExtensionsDocument.UserExtensions userExts = getfpdBuildOpts().addNewUserExtensions(); userExts.setUserID(userId); - userExts.setIdentifier(new BigInteger(id)); + userExts.setIdentifier(id); XmlCursor cursor = userExts.newCursor(); cursor.toEndToken(); @@ -1867,7 +1879,7 @@ public class FpdFileContents { if (!ues.getUserID().equals(userId)) { continue; } - if (ues.getIdentifier() == null || ues.getIdentifier().intValue() != id) { + if (ues.getIdentifier() == null || ues.getIdentifier() != new Integer(id).toString()) { continue; } XmlCursor cursor = ues.newCursor(); @@ -1967,7 +1979,7 @@ public class FpdFileContents { if (!ues.getUserID().equals(userId)) { continue; } - if (ues.getIdentifier()== null || ues.getIdentifier().intValue() != id) { + if (ues.getIdentifier()== null || ues.getIdentifier() != new Integer(id).toString()) { continue; } XmlCursor cursor = ues.newCursor(); @@ -2139,7 +2151,7 @@ public class FpdFileContents { if (!ues.getUserID().equals(userId)) { continue; } - if (ues.getIdentifier() == null || ues.getIdentifier().intValue() != id) { + if (ues.getIdentifier() == null || ues.getIdentifier() != new Integer(id).toString()) { continue; } XmlCursor cursor = ues.newCursor(); @@ -3703,10 +3715,10 @@ class PcdItemTypeConflictException extends Exception { PcdItemTypeConflictException (String pcdName, String info) { ModuleIdentification mi = WorkspaceProfile.getModuleId(info); if (mi != null) { - details = pcdName + " ItemType Conflicts with " + mi.getName() + " in Pkg " + mi.getPackageId().getName(); + details = pcdName + " ItemType Conflicts with " + mi.getName() + "\n in Pkg " + mi.getPackageId().getName(); } else { - details = pcdName + " ItemType Conflicts with " + info; + details = pcdName + " ItemType Conflicts with \n" + info; } } @@ -3729,7 +3741,7 @@ class PcdItemTypeConflictException extends Exception { moduleInfo2 = info2; } - details = pcdName + " ItemType Conflicts in " + moduleInfo1 + " and " + moduleInfo2; + details = pcdName + " ItemType Conflicts in \n" + moduleInfo1 + "\n and " + moduleInfo2; } public String getMessage() {