Author: vpakan(a)redhat.com
Date: 2010-03-18 07:29:27 -0400 (Thu, 18 Mar 2010)
New Revision: 20901
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
Log:
Fix getPathToResources() method.
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2010-03-18
05:13:43 UTC (rev 20900)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2010-03-18
11:29:27 UTC (rev 20901)
@@ -1,5 +1,6 @@
package org.jboss.tools.jsf.ui.bot.test;
+import java.io.File;
import java.io.IOException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
@@ -32,9 +33,19 @@
@Override
protected String getPathToResources(String testPage) throws IOException {
- return FileLocator
+ String filePath = FileLocator
.toFileURL(
Platform.getBundle(Activator.PLUGIN_ID).getEntry("/")).getFile() +
"resources/" + testPage; //$NON-NLS-1$ //$NON-NLS-2$
+
+ File file = new File(filePath);
+ if (!file.exists() || !file.isFile()) {
+ filePath = FileLocator
+ .toFileURL(
+ Platform.getBundle(Activator.PLUGIN_ID).getEntry("/")).getFile() +
testPage; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ return filePath;
+
}
protected void openTestPage() {
Show replies by date