Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thomann2009-04-03 02:04:46 +0000
committerOlivier Thomann2009-04-03 02:04:46 +0000
commitb20adaa54a1f0442c43a2cc76eca5492041fd65f (patch)
tree2125f153efb48860fe6078c17b8787dd84057174 /org.eclipse.jdt.compiler.apt.tests
parent372aa4feba2375a6e8b491523c5a83088de73b60 (diff)
downloadeclipse.jdt.core-b20adaa54a1f0442c43a2cc76eca5492041fd65f.tar.gz
eclipse.jdt.core-b20adaa54a1f0442c43a2cc76eca5492041fd65f.tar.xz
eclipse.jdt.core-b20adaa54a1f0442c43a2cc76eca5492041fd65f.zip
HEAD - Handle non-headless run
Diffstat (limited to 'org.eclipse.jdt.compiler.apt.tests')
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/BatchTestUtils.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/BatchTestUtils.java b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/BatchTestUtils.java
index 341b9df9d2..7c386eb158 100644
--- a/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/BatchTestUtils.java
+++ b/org.eclipse.jdt.compiler.apt.tests/src/org/eclipse/jdt/compiler/apt/tests/BatchTestUtils.java
@@ -262,8 +262,11 @@ public class BatchTestUtils {
}
protected static String getPluginDirectoryPath() {
try {
- URL platformURL = Platform.getBundle("org.eclipse.jdt.compiler.apt.tests").getEntry("/");
- return new File(FileLocator.toFileURL(platformURL).getFile()).getAbsolutePath();
+ if (Platform.isRunning()) {
+ URL platformURL = Platform.getBundle("org.eclipse.jdt.compiler.apt.tests").getEntry("/");
+ return new File(FileLocator.toFileURL(platformURL).getFile()).getAbsolutePath();
+ }
+ return new File(System.getProperty("user.dir")).getAbsolutePath();
} catch (IOException e) {
e.printStackTrace();
}

Back to the top