summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFileContents.java16
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java25
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java11
-rw-r--r--Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java11
4 files changed, 46 insertions, 17 deletions
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 d08202b94e..979d49ca39 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,6 +1186,11 @@ 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) {
//
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java
index 2d8b23760e..9e4df720b0 100644
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java
+++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java
@@ -672,17 +672,18 @@ public class FpdFrameworkModules extends IInternalFrame {
}
private void showSettingsDlg (int row) {
- try {
- Vector<String> vExceptions = new Vector<String>();
- if (ffc.adjustPcd(row, vExceptions)) {
- JOptionPane.showMessageDialog(frame, "Pcd entries sync. with those in MSA files.");
- docConsole.setSaved(false);
- }
- }
- catch (Exception exp) {
- JOptionPane.showMessageDialog(frame, exp.getMessage());
-// return;
- }
+// As PCD sync. check is full platform range now during opening FrameworkModules editor,
+// the following check is no longer needed.
+// try {
+// Vector<String> vExceptions = new Vector<String>();
+// if (ffc.adjustPcd(row, vExceptions)) {
+// JOptionPane.showMessageDialog(frame, "Pcd entries sync. with those in MSA files.");
+// docConsole.setSaved(false);
+// }
+// }
+// catch (Exception exp) {
+// JOptionPane.showMessageDialog(frame, exp.getMessage());
+// }
if (settingDlg == null) {
settingDlg = new FpdModuleSA(ffc);
@@ -864,7 +865,7 @@ public class FpdFrameworkModules extends IInternalFrame {
for (int i = 0; i < vExceptions.size(); ++i) {
errorMsg += " " + vExceptions.get(i) + "\n";
}
- JOptionPane.showMessageDialog(frame, "Error occurred during synchronization:" + errorMsg);
+ JOptionPane.showMessageDialog(frame, "Error occurred during synchronization:\n" + errorMsg);
}
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java
index 22bcf498ac..fc715516ed 100644
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java
+++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdModuleSA.java
@@ -581,12 +581,21 @@ public class FpdModuleSA extends JDialog implements ActionListener {
}
+ private String getModuleArch () {
+ String arch = "";
+ String[] moduleInfo = moduleKey.split(" ");
+ for (int i = 4; i < moduleInfo.length; ++i) {
+ arch += moduleInfo[i];
+ arch += " ";
+ }
+ return arch.trim();
+ }
private void addLibInstance (ModuleIdentification libMi) throws Exception{
//
// Add pcd information of selected instance to current moduleSA
//
- ffc.addFrameworkModulesPcdBuildDefs(libMi, null, ffc.getModuleSA(moduleKey));
+ ffc.addFrameworkModulesPcdBuildDefs(libMi, getModuleArch(), ffc.getModuleSA(moduleKey));
ffc.genLibraryInstance(libMi, moduleKey);
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java
index b06a97b0d7..8b0f4ccc1b 100644
--- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java
+++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/global/WorkspaceProfile.java
@@ -130,7 +130,7 @@ public class WorkspaceProfile {
return msa.getModuleDefinitions().getOutputFileBasename();
}
- public static boolean pcdInMsa (String cName, String tsGuid, ModuleIdentification mi) {
+ public static boolean pcdInMsa (String cName, String tsGuid, String supArchList, ModuleIdentification mi) {
ModuleSurfaceAreaDocument.ModuleSurfaceArea msa = (ModuleSurfaceAreaDocument.ModuleSurfaceArea)getModuleXmlObject(mi);
if (msa.getPcdCoded() == null || msa.getPcdCoded().getPcdEntryList() == null) {
return false;
@@ -139,7 +139,14 @@ public class WorkspaceProfile {
while (li.hasNext()) {
PcdCodedDocument.PcdCoded.PcdEntry msaPcd = (PcdCodedDocument.PcdCoded.PcdEntry)li.next();
if (msaPcd.getCName().equals(cName) && msaPcd.getTokenSpaceGuidCName().equals(tsGuid)) {
- return true;
+ if (supArchList != null && msaPcd.getSupArchList() != null) {
+ if (msaPcd.getSupArchList().toString().toLowerCase().contains(supArchList.trim().toLowerCase())) {
+ return true;
+ }
+ }
+ else{
+ return true;
+ }
}
}
return false;