Author: dgolovin
Date: 2010-06-01 18:59:10 -0400 (Tue, 01 Jun 2010)
New Revision: 22471
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/build.properties
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/build.properties
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAbstractTest.java
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java
Log:
https://jira.jboss.org/browse/JBDS-1202 problems running tests
vpe component tests fix:
- fix manifest errors
- xulrunner init code moved from vpe to vpe.xulrunner plugin
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-06-01 22:10:19 UTC (rev 22470)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2010-06-01 22:59:10 UTC (rev 22471)
@@ -3,9 +3,6 @@
<plugin>
<extension-point id="templates" name="Path to xml file with
templates definitionj" schema="schema/templates.exsd"/>
<extension-point id="localeProvider" name="Locale provider for an
opened file" schema="schema/localeProvider.exsd"/>
- <extension
- point="org.eclipse.ui.startup">
- </extension>
<extension point="org.jboss.tools.common.model.meta">
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2010-06-01
22:10:19 UTC (rev 22470)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2010-06-01
22:59:10 UTC (rev 22471)
@@ -26,7 +26,7 @@
/**
* The main plugin class to be used in the desktop.
*/
-public class VpePlugin extends BaseUIPlugin implements IStartup {
+public class VpePlugin extends BaseUIPlugin {
public static final String PLUGIN_ID = "org.jboss.tools.vpe"; //$NON-NLS-1$
public static final String EXTESION_POINT_VPE_TEMPLATES =
"org.jboss.tools.vpe.templates"; //$NON-NLS-1$
@@ -48,8 +48,8 @@
*/
public void start(BundleContext context) throws Exception {
super.start(context);
- // required to get tests running in tycho, should not affect anything during regular
start
- earlyStartup();
+// moved to vpe.xulrunner plug-in
+// earlyStartup();
}
/**
@@ -95,17 +95,6 @@
return getDefault();
}
- public void earlyStartup() {
- /* init xulrunner path for */
- try {
- String xulRunnerPath = XulRunnerBrowser.getXulRunnerPath();
- if ("true".equals(Platform.getDebugOption(PLUGIN_ID +
"/debug/earlyStartup"))) { //$NON-NLS-1$ //$NON-NLS-2$
- logInfo("earlyStartup: XULRunner path is: " + xulRunnerPath);
//$NON-NLS-1$
- }
- } catch (XulRunnerException e) {
- logError(e);
- }
- }
public static String getPluginResourcePath() {
Bundle bundle = Platform.getBundle(PLUGIN_ID);
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2010-06-01
22:10:19 UTC (rev 22470)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2010-06-01
22:59:10 UTC (rev 22471)
@@ -4,6 +4,7 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
+import org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser;
import org.osgi.framework.BundleContext;
/**
@@ -40,6 +41,8 @@
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
+ // required to be here to fix tycho test execution errors
+ earlyStartup();
}
/*
@@ -74,4 +77,16 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
+
+ public void earlyStartup() {
+ /* init xulrunner path for */
+ try {
+ String xulRunnerPath = XulRunnerBrowser.getXulRunnerPath();
+// if ("true".equals(Platform.getDebugOption(PLUGIN_ID +
"/debug/earlyStartup"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ logInfo("earlyStartup: XULRunner path is: " + xulRunnerPath);
//$NON-NLS-1$
+// }
+ } catch (XulRunnerException e) {
+ logError(e);
+ }
+ }
}
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF 2010-06-01 22:10:19
UTC (rev 22470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF 2010-06-01 22:59:10
UTC (rev 22471)
@@ -19,7 +19,8 @@
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: lib/jmock-2.5.1/jmock-2.5.1.jar,
lib/jmock-2.5.1/hamcrest-core-1.1.jar,
- lib/jmock-2.5.1/hamcrest-library-1.1.jar
+ lib/jmock-2.5.1/hamcrest-library-1.1.jar,
+ .
Export-Package: org.hamcrest,
org.jboss.tools.vpe.ui.test,
org.jboss.tools.vpe.ui.test.dialog,
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/build.properties
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/build.properties 2010-06-01 22:10:19 UTC
(rev 22470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/build.properties 2010-06-01 22:59:10 UTC
(rev 22471)
@@ -3,7 +3,8 @@
plugin.xml,\
plugin.properties,\
resources/,\
- lib/
+ lib/,\
+ .
jars.compile.order = .
source.. = src/
source.. = src/
Modified: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF 2010-06-01
22:10:19 UTC (rev 22470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/META-INF/MANIFEST.MF 2010-06-01
22:59:10 UTC (rev 22471)
@@ -10,6 +10,7 @@
org.junit,
org.jboss.tools.common,
org.jboss.tools.vpe.xulrunner,
+ org.jboss.tools.tests;bundle-version="3.1.0",
org.mozilla.xpcom;bundle-version="1.9.1"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.vpe.xulrunner.test,
Modified: trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/build.properties
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/build.properties 2010-06-01
22:10:19 UTC (rev 22470)
+++ trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/build.properties 2010-06-01
22:59:10 UTC (rev 22471)
@@ -1,7 +1,8 @@
output.. = bin/
bin.includes = META-INF/,\
plugin.xml,\
- plugin.properties
+ plugin.properties,\
+ .
src.includes = src/,\
plugin.xml,\
build.properties,\
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAbstractTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAbstractTest.java 2010-06-01
22:10:19 UTC (rev 22470)
+++
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAbstractTest.java 2010-06-01
22:59:10 UTC (rev 22471)
@@ -13,6 +13,7 @@
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
import org.jboss.tools.vpe.xulrunner.view.XulRunnerView;
@@ -73,28 +74,14 @@
}
}
- /**
- * Wait until all background tasks are complete.
- */
- public void waitForJobs() {
- while (Job.getJobManager().currentJob() != null)
- delay(1000);
- }
-
@Override
protected void setUp() throws Exception {
super.setUp();
- waitForJobs();
+ JobUtils.waitForIdle();
xulRunnerView
= ((XulRunnerView) PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage().showView(VIEW_ID));
-
- // Delay for 3 seconds so that
- // the Favorites view can be seen.
- waitForJobs();
- // commented by dgolovin to get rid of jvm error [libexpat.so.0+0xeff4]
- //delay(3000);
-
+ JobUtils.waitForIdle();
xulRunnerEditor = xulRunnerView.getBrowser();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java 2010-06-01
22:10:19 UTC (rev 22470)
+++
trunk/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java 2010-06-01
22:59:10 UTC (rev 22471)
@@ -22,13 +22,13 @@
xulrunnerEditor.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
true, true));
} catch (XulRunnerException e) {
- BrowserPlugin.getPluginLog().logError(e);
+ throw new RuntimeException(e);
}
}
@Override
public void setFocus() {
- xulrunnerEditor.setFocus();
+ xulrunnerEditor.setFocus();
}
public XulRunnerEditor getBrowser() {