Author: Grid.Qian
Date: 2009-06-10 05:30:20 -0400 (Wed, 10 Jun 2009)
New Revision: 15841
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/SchemaImportDialog.java
Log:
JBIDE-4460: the org.eclipse.swt.swtexception:Invalid Thread access when choose a wsdl file
in the import wsdl wizard
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/SchemaImportDialog.java
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/SchemaImportDialog.java 2009-06-10
08:54:59 UTC (rev 15840)
+++
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dialogs/SchemaImportDialog.java 2009-06-10
09:30:20 UTC (rev 15841)
@@ -652,14 +652,19 @@
@Override
protected IStatus run (IProgressMonitor monitor) {
monitor.beginTask(msg, 1);
-
- fInput = attemptLoad(fRunnableLoadURI);
- monitor.worked(1);
- if (fBrowseButton != null && fBrowseButton.isDisposed() == false ) {
+ // move this to asyncExec() as below because the method will
+ // modify UI element, if not, will have a invalid access error.
+
+ /* fInput = attemptLoad(fRunnableLoadURI); */
+
+ monitor.worked(1);
+ if (fBrowseButton != null
+ && fBrowseButton.isDisposed() == false) {
fBrowseButton.getDisplay().asyncExec(new Runnable() {
public void run() {
- loadDone();
- }
+ fInput = attemptLoad(fRunnableLoadURI);
+ loadDone();
+ }
});
}