diff options
author | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-14 07:14:04 +0000 |
---|---|---|
committer | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-14 07:14:04 +0000 |
commit | ed7aa83f2e64b8e6be0600b06e93fd3987a62fa6 (patch) | |
tree | d0faef895dcfff85414b7a37c7fbf6f570d599a7 /Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard | |
parent | c2bf31448eeadfc555b2dfcda3baf4accf03379b (diff) | |
download | edk2-platforms-ed7aa83f2e64b8e6be0600b06e93fd3987a62fa6.tar.xz |
Modify the way of pcd warning message reporting to be a total in the end.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1948 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard')
2 files changed, 26 insertions, 9 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 cca9738a11..1c41daf1fe 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 @@ -383,7 +383,7 @@ public class FpdFileContents { cursor.dispose();
}
- public boolean adjustPcd (int seqModuleSa) throws Exception {
+ public boolean adjustPcd (int seqModuleSa, Vector<String> vExceptions) throws Exception {
boolean dataModified = false;
ModuleSADocument.ModuleSA moduleSa = getModuleSA(seqModuleSa);
int pcdCount = getPcdDataCount(seqModuleSa);
@@ -403,6 +403,7 @@ public class FpdFileContents { getLibraryInstances(moduleKey, saaLib);
ModuleIdentification mi = WorkspaceProfile.getModuleId(moduleKey);
if (mi == null) {
+ vExceptions.add("Module " + mg + " does NOT exist in workspace.");
throw new Exception ("Module does NOT exist in workspace.");
}
Vector<ModuleIdentification> vMi = new Vector<ModuleIdentification>();
@@ -413,7 +414,9 @@ public class FpdFileContents { for (int j = 0; j < saaLib.length; ++j) {
String libKey = saaLib[j][1] + " " + saaLib[j][2] + " " + saaLib[j][3] + " " + saaLib[j][4];
ModuleIdentification libMi = WorkspaceProfile.getModuleId(libKey);
- vMi.add(libMi);
+ if (libMi != null) {
+ vMi.add(libMi);
+ }
}
nextPcd:for (int i = 0; i < saaModuleSaPcd.length; ++i) {
@@ -458,8 +461,13 @@ public class FpdFileContents { //
// ToDo Error
//
- throw new PcdDeclNotFound("No Declaration for PCD Entry " + msaPcd.getCName() + " in Module "
- + mi.getName());
+ String errorMessage = "No Declaration for PCD Entry " + msaPcd.getCName() + " in Module "
+ + mi.getName();
+ if (i != 0) {
+ errorMessage += " Library Instance " + vMi.get(i).getName();
+ }
+ vExceptions.add(errorMessage);
+ throw new PcdDeclNotFound(errorMessage);
}
//
// AddItem to ModuleSA PcdBuildDefinitions
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 75f7474a02..74b84626e5 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,7 +672,8 @@ public class FpdFrameworkModules extends IInternalFrame { private void showSettingsDlg (int row) {
try {
- if (ffc.adjustPcd(row)) {
+ 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);
}
@@ -852,9 +853,17 @@ public class FpdFrameworkModules extends IInternalFrame { public FpdFrameworkModules(OpeningPlatformType opt) {
this(opt.getXmlFpd());
docConsole = opt;
- if (pcdSync()) {
+ Vector<String> vExceptions = new Vector<String>();
+ if (pcdSync(vExceptions)) {
JOptionPane.showMessageDialog(frame, "PCD in this platform are synchronized with those in MSA files.");
}
+ if (vExceptions.size() > 0) {
+ String errorMsg = "";
+ for (int i = 0; i < vExceptions.size(); ++i) {
+ errorMsg += " " + vExceptions.get(i);
+ }
+ JOptionPane.showMessageDialog(frame, "Error occurred during synchronization:" + errorMsg);
+ }
}
private void init(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {
@@ -916,16 +925,16 @@ public class FpdFrameworkModules extends IInternalFrame { }
- private boolean pcdSync() {
+ private boolean pcdSync(Vector<String> v) {
boolean synced = false;
for (int i = 0; i < jTableFpdModules.getRowCount(); ++i) {
try {
- if (ffc.adjustPcd(i)) {
+ if (ffc.adjustPcd(i, v)) {
synced = true;
}
}
catch (Exception exp) {
- JOptionPane.showMessageDialog(frame, exp.getMessage());
+// JOptionPane.showMessageDialog(frame, exp.getMessage());
continue;
}
}
|