mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
c2bf31448e
commit
ed7aa83f2e
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue