diff options
author | Olivier Thomann | 2009-04-03 02:04:46 +0000 |
---|---|---|
committer | Olivier Thomann | 2009-04-03 02:04:46 +0000 |
commit | b20adaa54a1f0442c43a2cc76eca5492041fd65f (patch) | |
tree | 2125f153efb48860fe6078c17b8787dd84057174 /org.eclipse.jdt.compiler.apt.tests | |
parent | 372aa4feba2375a6e8b491523c5a83088de73b60 (diff) | |
download | eclipse.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.java | 7 |
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(); } |