Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2012-12-29 13:42:45 +0000
committerStephan Herrmann2012-12-29 13:42:45 +0000
commit98b05f70e8efda2f48512c9dd76f2dd1e2704e04 (patch)
treebb1a12029c0dd2f640f23c42169280136e6bdcf8 /testplugins
parent73c662599ac0a1b5a26fc032ac01e1055eebe0ba (diff)
downloadorg.eclipse.objectteams-98b05f70e8efda2f48512c9dd76f2dd1e2704e04.tar.gz
org.eclipse.objectteams-98b05f70e8efda2f48512c9dd76f2dd1e2704e04.tar.xz
org.eclipse.objectteams-98b05f70e8efda2f48512c9dd76f2dd1e2704e04.zip
Bug 397182 - Prepare OTDT for new (dynamic) weaver
- let otdt plug-in coordinate selection of - compiler mode - OTRE classpath container - let otdt.tests automatically adjust to the selection OTRE/OTREDyn - bump up otequinox to 3.0.0 - new: TransformerPlugin.useDynamicWeaving() - this version shall be able to alternatively handle both variants of the weaver
Diffstat (limited to 'testplugins')
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/.gitignore1
-rw-r--r--testplugins/org.eclipse.objectteams.otdt.tests/src/org/eclipse/objectteams/otdt/tests/ClasspathUtil.java29
2 files changed, 26 insertions, 4 deletions
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/.gitignore b/testplugins/org.eclipse.objectteams.otdt.tests/.gitignore
new file mode 100644
index 000000000..41aab353a
--- /dev/null
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/.gitignore
@@ -0,0 +1 @@
+/otdyn
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/src/org/eclipse/objectteams/otdt/tests/ClasspathUtil.java b/testplugins/org.eclipse.objectteams.otdt.tests/src/org/eclipse/objectteams/otdt/tests/ClasspathUtil.java
index ed39c53bc..d06cbda4d 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/src/org/eclipse/objectteams/otdt/tests/ClasspathUtil.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/src/org/eclipse/objectteams/otdt/tests/ClasspathUtil.java
@@ -22,17 +22,38 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.objectteams.otdt.core.ext.OTDTPlugin;
import org.eclipse.objectteams.otdt.core.ext.OTREContainer;
+import org.eclipse.objectteams.otdt.internal.core.compiler.mappings.CallinImplementorDyn;
/** Constants for the classpath of OT/J Projects.*/
public class ClasspathUtil {
// === OT Paths: ===
- public static final String OTRE_PATH = new OTREContainer().getClasspathEntries()[0].getPath().toOSString();
+ // TODO(SH): adjust for otdyn:
+ public static final String OTRE_OF_PATH = "/home/stephan/git/otredyn/otj/org.eclipse.objectteams.otredyn";
+ public static final String OTRE_PATH;
+ //new OTREContainer().getClasspathEntries()[0].getPath().toOSString();
public static final String OTDT_PATH = JavaCore.getClasspathVariable(OTDTPlugin.OTDT_INSTALLDIR).toOSString();
- public static final String OTRE_MIN_JAR_PATH = getOTDTJarPath("otre_min");
- public static final String OTAGENT_JAR_PATH = getOTDTJarPath("otre_agent");
- public static final IPath BCEL_JAR_PATH = OTREContainer.BCEL_PATH;
+ public static final String OTRE_MIN_JAR_PATH;
+ public static final String OTAGENT_JAR_PATH;
+ // getOTDTJarPath("otre_agent");
+ // hijack this var to point to ASM instead:
+ public static final IPath BCEL_JAR_PATH;
+ // OTREContainer.BCEL_PATH;
+ static {
+ if (CallinImplementorDyn.DYNAMIC_WEAVING) {
+ OTRE_PATH = OTRE_OF_PATH+"/bin";
+ OTRE_MIN_JAR_PATH = OTRE_OF_PATH+"/otre_min.jar";
+ OTAGENT_JAR_PATH = OTRE_OF_PATH+"/otre_agent.jar";
+ BCEL_JAR_PATH = JavaCore.getClasspathVariable("ECLIPSE_HOME").append("/plugins/org.objectweb.asm_3.3.1.v201105211655.jar");
+ } else {
+ OTRE_PATH = new OTREContainer().getClasspathEntries()[0].getPath().toOSString();
+ OTRE_MIN_JAR_PATH = getOTDTJarPath("otre_min");
+ OTAGENT_JAR_PATH = getOTDTJarPath("otre_agent");
+ BCEL_JAR_PATH = OTREContainer.BCEL_PATH;
+ }
+ }
+
private static String getOTDTJarPath(String jarName) {
return OTDT_PATH + File.separator + "lib" + File.separator + jarName + ".jar";
}

Back to the top