Author: dgolovin
Date: 2008-02-14 20:25:48 -0500 (Thu, 14 Feb 2008)
New Revision: 6321
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
Log:
adjust VPE editor loading. Call delay after openEditor() not needed anymore, because wait
for visual part loading added in VPE. It will show up only when Visual and Source Parts
completely initialized. It can lead to JVM errors during tests on hudson.
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2008-02-14
23:14:19 UTC (rev 6320)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2008-02-15
01:25:48 UTC (rev 6321)
@@ -209,10 +209,10 @@
assertNotNull(part);
// wait for jobs
- TestUtil.waitForJobs();
+ //TestUtil.waitForJobs();
// wait full initialization of vpe
// commented by dgolovin to get rid of jvm error [libexpat.so.0+0xeff4]
- TestUtil.delay(1000);
+ //TestUtil.delay(1000);
return part;
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-02-14
23:14:19 UTC (rev 6320)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-02-15
01:25:48 UTC (rev 6321)
@@ -27,6 +27,7 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
@@ -238,6 +239,15 @@
};
xulRunnerEditor.setURL(INIT_URL);
+ // Wait while visual part is loaded
+ BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
+ public void run() {
+ while(Display.getCurrent().readAndDispatch()
+ && getController()==null) {
+ // do nothing
+ }
+ }
+ });
xulRunnerEditor.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
}
catch (Exception e) {
Show replies by date