cursor.dispose();\r
}\r
\r
- public boolean adjustPcd (int seqModuleSa) throws Exception {\r
+ public boolean adjustPcd (int seqModuleSa, Vector<String> vExceptions) throws Exception {\r
boolean dataModified = false;\r
ModuleSADocument.ModuleSA moduleSa = getModuleSA(seqModuleSa);\r
int pcdCount = getPcdDataCount(seqModuleSa);\r
getLibraryInstances(moduleKey, saaLib);\r
ModuleIdentification mi = WorkspaceProfile.getModuleId(moduleKey);\r
if (mi == null) {\r
+ vExceptions.add("Module " + mg + " does NOT exist in workspace.");\r
throw new Exception ("Module does NOT exist in workspace.");\r
}\r
Vector<ModuleIdentification> vMi = new Vector<ModuleIdentification>();\r
for (int j = 0; j < saaLib.length; ++j) {\r
String libKey = saaLib[j][1] + " " + saaLib[j][2] + " " + saaLib[j][3] + " " + saaLib[j][4];\r
ModuleIdentification libMi = WorkspaceProfile.getModuleId(libKey);\r
- vMi.add(libMi);\r
+ if (libMi != null) {\r
+ vMi.add(libMi);\r
+ }\r
}\r
\r
nextPcd:for (int i = 0; i < saaModuleSaPcd.length; ++i) {\r
//\r
// ToDo Error \r
//\r
- throw new PcdDeclNotFound("No Declaration for PCD Entry " + msaPcd.getCName() + " in Module "\r
- + mi.getName());\r
+ String errorMessage = "No Declaration for PCD Entry " + msaPcd.getCName() + " in Module "\r
+ + mi.getName();\r
+ if (i != 0) {\r
+ errorMessage += " Library Instance " + vMi.get(i).getName(); \r
+ }\r
+ vExceptions.add(errorMessage);\r
+ throw new PcdDeclNotFound(errorMessage);\r
}\r
//\r
// AddItem to ModuleSA PcdBuildDefinitions\r
\r
private void showSettingsDlg (int row) {\r
try {\r
- if (ffc.adjustPcd(row)) {\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
public FpdFrameworkModules(OpeningPlatformType opt) {\r
this(opt.getXmlFpd());\r
docConsole = opt;\r
- if (pcdSync()) {\r
+ Vector<String> vExceptions = new Vector<String>();\r
+ if (pcdSync(vExceptions)) {\r
JOptionPane.showMessageDialog(frame, "PCD in this platform are synchronized with those in MSA files."); \r
}\r
+ if (vExceptions.size() > 0) {\r
+ String errorMsg = "";\r
+ for (int i = 0; i < vExceptions.size(); ++i) {\r
+ errorMsg += " " + vExceptions.get(i);\r
+ }\r
+ JOptionPane.showMessageDialog(frame, "Error occurred during synchronization:" + errorMsg);\r
+ }\r
}\r
\r
private void init(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {\r
\r
}\r
\r
- private boolean pcdSync() {\r
+ private boolean pcdSync(Vector<String> v) {\r
boolean synced = false;\r
for (int i = 0; i < jTableFpdModules.getRowCount(); ++i) {\r
try {\r
- if (ffc.adjustPcd(i)) {\r
+ if (ffc.adjustPcd(i, v)) {\r
synced = true;\r
}\r
}\r
catch (Exception exp) {\r
- JOptionPane.showMessageDialog(frame, exp.getMessage());\r
+// JOptionPane.showMessageDialog(frame, exp.getMessage());\r
continue;\r
}\r
}\r