if (nextMi == null) {\r
continue;\r
}\r
- if (WorkspaceProfile.pcdInMsa(saaModuleSaPcd[i][0], saaModuleSaPcd[i][1], nextMi)) {\r
+ if (WorkspaceProfile.pcdInMsa(saaModuleSaPcd[i][0], saaModuleSaPcd[i][1], arch, nextMi)) {\r
continue nextPcd;\r
}\r
}\r
}\r
}\r
}\r
+ // Check sup arch conformance for the new PCD\r
+ if (msaPcd.getSupArchList() != null) {\r
+ String newPcdArch = msaPcd.getSupArchList().toString();\r
+ if (!newPcdArch.toLowerCase().contains(arch.toLowerCase())) {\r
+ continue;\r
+ }\r
+ }\r
\r
PackageIdentification[] depPkgs = SurfaceAreaQuery.getDependencePkg(null, vMi.get(i));\r
PcdDeclarationsDocument.PcdDeclarations.PcdEntry spdPcd = LookupPcdDeclaration(msaPcd, depPkgs);\r
\r
int pcdSourceCount = 0;\r
for (int i = 0; i < vMi.size(); ++i) {\r
- if (WorkspaceProfile.pcdInMsa(cName, tsGuidCName, vMi.get(i))) {\r
+ if (WorkspaceProfile.pcdInMsa(cName, tsGuidCName, null, vMi.get(i))) {\r
pcdSourceCount++;\r
}\r
}\r
ListIterator li = l.listIterator();\r
while (li.hasNext()) {\r
PcdCodedDocument.PcdCoded.PcdEntry msaPcd = (PcdCodedDocument.PcdCoded.PcdEntry) li.next();\r
+ if (msaPcd.getSupArchList() != null) {\r
+ if (!msaPcd.getSupArchList().toString().toLowerCase().contains(arch.toLowerCase())) {\r
+ continue;\r
+ }\r
+ }\r
PcdDeclarationsDocument.PcdDeclarations.PcdEntry spdPcd = LookupPcdDeclaration(msaPcd, depPkgs);\r
if (spdPcd == null) {\r
//\r
}\r
\r
private void showSettingsDlg (int row) {\r
- try {\r
- Vector<String> vExceptions = new Vector<String>();\r
- if (ffc.adjustPcd(row, vExceptions)) {\r
- JOptionPane.showMessageDialog(frame, "Pcd entries sync. with those in MSA files.");\r
- docConsole.setSaved(false);\r
- }\r
- }\r
- catch (Exception exp) {\r
- JOptionPane.showMessageDialog(frame, exp.getMessage());\r
-// return;\r
- }\r
+// As PCD sync. check is full platform range now during opening FrameworkModules editor,\r
+// the following check is no longer needed.\r
+// try {\r
+// Vector<String> vExceptions = new Vector<String>();\r
+// if (ffc.adjustPcd(row, vExceptions)) {\r
+// JOptionPane.showMessageDialog(frame, "Pcd entries sync. with those in MSA files.");\r
+// docConsole.setSaved(false);\r
+// }\r
+// }\r
+// catch (Exception exp) {\r
+// JOptionPane.showMessageDialog(frame, exp.getMessage());\r
+// }\r
\r
if (settingDlg == null) {\r
settingDlg = new FpdModuleSA(ffc);\r
for (int i = 0; i < vExceptions.size(); ++i) {\r
errorMsg += " " + vExceptions.get(i) + "\n";\r
}\r
- JOptionPane.showMessageDialog(frame, "Error occurred during synchronization:" + errorMsg);\r
+ JOptionPane.showMessageDialog(frame, "Error occurred during synchronization:\n" + errorMsg);\r
}\r
}\r
\r
\r
}\r
\r
+ private String getModuleArch () {\r
+ String arch = "";\r
+ String[] moduleInfo = moduleKey.split(" ");\r
+ for (int i = 4; i < moduleInfo.length; ++i) {\r
+ arch += moduleInfo[i];\r
+ arch += " ";\r
+ }\r
+ return arch.trim();\r
+ }\r
private void addLibInstance (ModuleIdentification libMi) throws Exception{\r
\r
//\r
// Add pcd information of selected instance to current moduleSA\r
//\r
- ffc.addFrameworkModulesPcdBuildDefs(libMi, null, ffc.getModuleSA(moduleKey));\r
+ ffc.addFrameworkModulesPcdBuildDefs(libMi, getModuleArch(), ffc.getModuleSA(moduleKey));\r
\r
ffc.genLibraryInstance(libMi, moduleKey);\r
}\r
return msa.getModuleDefinitions().getOutputFileBasename();\r
}\r
\r
- public static boolean pcdInMsa (String cName, String tsGuid, ModuleIdentification mi) {\r
+ public static boolean pcdInMsa (String cName, String tsGuid, String supArchList, ModuleIdentification mi) {\r
ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = (ModuleSurfaceAreaDocument.ModuleSurfaceArea)getModuleXmlObject(mi);\r
if (msa.getPcdCoded() == null || msa.getPcdCoded().getPcdEntryList() == null) {\r
return false;\r
while (li.hasNext()) {\r
PcdCodedDocument.PcdCoded.PcdEntry msaPcd = (PcdCodedDocument.PcdCoded.PcdEntry)li.next();\r
if (msaPcd.getCName().equals(cName) && msaPcd.getTokenSpaceGuidCName().equals(tsGuid)) {\r
- return true;\r
+ if (supArchList != null && msaPcd.getSupArchList() != null) {\r
+ if (msaPcd.getSupArchList().toString().toLowerCase().contains(supArchList.trim().toLowerCase())) {\r
+ return true;\r
+ }\r
+ }\r
+ else{\r
+ return true;\r
+ }\r
}\r
}\r
return false;\r