mirror of https://github.com/acidanthera/audk.git
Utilize multi-thread support of JAVA to improve UI response time of opening FrameworkModules in a platform.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2488 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3aaddf9276
commit
55c30c85e0
|
@ -836,6 +836,24 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||
new FpdFrameworkModules().setVisible(true);
|
||||
}
|
||||
|
||||
private class PcdSyncTask extends Thread {
|
||||
|
||||
public void run () {
|
||||
Vector<String> vExceptions = new Vector<String>();
|
||||
if (pcdSync(vExceptions)) {
|
||||
JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "PCD in this platform are synchronized with those in MSA files.");
|
||||
docConsole.setSaved(false);
|
||||
}
|
||||
if (vExceptions.size() > 0) {
|
||||
String errorMsg = "";
|
||||
for (int i = 0; i < vExceptions.size(); ++i) {
|
||||
errorMsg += " " + vExceptions.get(i) + "\n";
|
||||
}
|
||||
JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "Error occurred during synchronization:\n" + errorMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the default constructor
|
||||
*/
|
||||
|
@ -850,21 +868,14 @@ public class FpdFrameworkModules extends IInternalFrame {
|
|||
|
||||
}
|
||||
|
||||
private PcdSyncTask pst = null;
|
||||
public FpdFrameworkModules(OpeningPlatformType opt) {
|
||||
this(opt.getXmlFpd());
|
||||
docConsole = opt;
|
||||
Vector<String> vExceptions = new Vector<String>();
|
||||
if (pcdSync(vExceptions)) {
|
||||
JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "PCD in this platform are synchronized with those in MSA files.");
|
||||
docConsole.setSaved(false);
|
||||
}
|
||||
if (vExceptions.size() > 0) {
|
||||
String errorMsg = "";
|
||||
for (int i = 0; i < vExceptions.size(); ++i) {
|
||||
errorMsg += " " + vExceptions.get(i) + "\n";
|
||||
}
|
||||
JOptionPane.showMessageDialog(FrameworkWizardUI.getInstance(), "Error occurred during synchronization:\n" + errorMsg);
|
||||
if (pst == null) {
|
||||
pst = new PcdSyncTask();
|
||||
}
|
||||
pst.start();
|
||||
}
|
||||
|
||||
private void init(PlatformSurfaceAreaDocument.PlatformSurfaceArea fpd) {
|
||||
|
|
Loading…
Reference in New Issue