diff options
author | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-03-20 03:02:13 +0000 |
---|---|---|
committer | jlin16 <jlin16@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-03-20 03:02:13 +0000 |
commit | 55c30c85e0b0f1c7aedf97a024fe9cff20aa7c69 (patch) | |
tree | ac71da5dd81fb290cddd5c932079028d31c5029d /Tools/Java | |
parent | 3aaddf9276ccf00b4b6349dfce058e3ae287dd3a (diff) | |
download | edk2-55c30c85e0b0f1c7aedf97a024fe9cff20aa7c69.tar.gz edk2-55c30c85e0b0f1c7aedf97a024fe9cff20aa7c69.tar.bz2 edk2-55c30c85e0b0f1c7aedf97a024fe9cff20aa7c69.zip |
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
Diffstat (limited to 'Tools/Java')
-rw-r--r-- | Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdFrameworkModules.java | 33 |
1 files changed, 22 insertions, 11 deletions
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 e219ee3291..902c12a17c 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 @@ -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) {
|