Bug 433077 - [otdre] select weaving scheme via a regular compiler option
- adjust tests to support both schemes (OTJLD tests, others to follow)
diff --git a/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/CompilationOrderTests.java b/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/CompilationOrderTests.java
index 520ef39..836f60b 100644
--- a/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/CompilationOrderTests.java
+++ b/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/CompilationOrderTests.java
@@ -1,7 +1,7 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  * 
- * Copyright 2004, 2010 Fraunhofer Gesellschaft, Munich, Germany,
+ * Copyright 2004, 2014 Fraunhofer Gesellschaft, Munich, Germany,
  * for its Fraunhofer Institute and Computer Architecture and Software
  * Technology (FIRST), Berlin, Germany and Technical University Berlin,
  * Germany.
@@ -10,7 +10,6 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * $Id$
  * 
  * Please visit http://www.eclipse.org/objectteams for updates and contact.
  * 
@@ -52,7 +51,7 @@
 		System.out.println("***** test177otjd5f() *****");
 		IPath projectPath = env.addProject("Project", "1.5"); 
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, ClasspathUtil.OTRE_PATH);
+		env.addExternalJar(projectPath, ClasspathUtil.getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, "");
diff --git a/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/IncrementalTests.java b/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/IncrementalTests.java
index 7757841..9d50a82 100644
--- a/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/IncrementalTests.java
+++ b/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/IncrementalTests.java
@@ -1,7 +1,7 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  * 
- * Copyright 2004, 2010 Fraunhofer Gesellschaft, Munich, Germany,
+ * Copyright 2004, 2014 Fraunhofer Gesellschaft, Munich, Germany,
  * for its Fraunhofer Institute and Computer Architecture and Software
  * Technology (FIRST), Berlin, Germany and Technical University Berlin,
  * Germany.
@@ -30,8 +30,8 @@
 import org.eclipse.jdt.core.compiler.CategorizedProblem;
 import org.eclipse.jdt.core.tests.builder.Problem;
 import org.eclipse.jdt.core.tests.util.Util;
+import static org.eclipse.objectteams.otdt.tests.ClasspathUtil.getOTREPath;
 
-import static org.eclipse.objectteams.otdt.tests.ClasspathUtil.OTRE_PATH;
 /**
  * This test class tests incremental compilation of teams and roles.
  */
@@ -53,7 +53,7 @@
 		System.out.println("***** testRemoveTeamType() *****");
 		IPath projectPath = env.addProject("Project", "1.5"); 
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, "");
@@ -96,7 +96,7 @@
 		System.out.println("***** testRemoveRoleType() *****");
 		IPath projectPath = env.addProject("Project", "1.5"); 
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, "");
@@ -141,7 +141,7 @@
 		System.out.println("***** testRemoveRoleFile() *****");
 		IPath projectPath = env.addProject("Project", "1.5"); 
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, "");
@@ -180,7 +180,7 @@
 		System.out.println("***** testRemoveRoleMethod() *****");
 		IPath projectPath = env.addProject("Project", "1.5");
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, "");
@@ -241,7 +241,7 @@
 		System.out.println("***** testModifyTSuperRole1() *****");
 		IPath projectPath = env.addProject("Project", "1.5"); 
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, ""); 
@@ -298,7 +298,7 @@
 		System.out.println("***** testModifyTSuperRole2() *****");
 		IPath projectPath = env.addProject("Project", "1.5"); 
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, ""); 
@@ -358,7 +358,7 @@
 		System.out.println("***** testModifyTSuperRole3() *****");
 		IPath projectPath = env.addProject("Project", "1.5");
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide 
 		env.removePackageFragmentRoot(projectPath, "");
@@ -424,7 +424,7 @@
 		System.out.println("***** testModifySuperRole1() *****");
 		IPath projectPath = env.addProject("Project", "1.5"); 
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, ""); 
@@ -477,7 +477,7 @@
 		System.out.println("***** testModifySiblingRole1() *****");
 		IPath projectPath = env.addProject("Project", "1.5"); 
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, ""); 
@@ -532,7 +532,7 @@
 		System.out.println("***** testModifyTeam1() *****");
 		IPath projectPath = env.addProject("Project", "1.5");
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, ""); 
@@ -601,7 +601,7 @@
 		System.out.println("***** testAddRoFiToCompiledTeam() *****");
 		IPath projectPath = env.addProject("Project", "1.5");
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide 
 		env.removePackageFragmentRoot(projectPath, "");
@@ -654,7 +654,7 @@
 		System.out.println("***** testAddRoFiToBrokenTeam() *****");
 		IPath projectPath = env.addProject("Project", "1.5");
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 	
 		// remove old package fragment root so that names don't collide 
 		env.removePackageFragmentRoot(projectPath, "");
@@ -716,7 +716,7 @@
 		System.out.println("***** testBreakTeamWithRoFi() *****");
 		IPath projectPath = env.addProject("Project", "1.5");
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 	
 		// remove old package fragment root so that names don't collide 
 		env.removePackageFragmentRoot(projectPath, "");
@@ -761,7 +761,7 @@
 		System.out.println("***** testRoFiExtendsInline() *****");
 		IPath projectPath = env.addProject("Project", "1.5");
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide 
 		env.removePackageFragmentRoot(projectPath, "");
@@ -816,7 +816,7 @@
 		System.out.println("***** testRemoveBoundBaseMethod() *****");
 		IPath projectPath = env.addProject("Project", "1.5");
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide 
 		env.removePackageFragmentRoot(projectPath, "");
@@ -873,7 +873,7 @@
 		System.out.println("***** testPhantomRole() *****");
 		IPath projectPath = env.addProject("Project", "1.5");
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, getOTREPath(this.weavingScheme));
 
 		// remove old package fragment root so that names don't collide 
 		env.removePackageFragmentRoot(projectPath, "");
diff --git a/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/MultipleCallinsWarningTest.java b/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/MultipleCallinsWarningTest.java
index e3fd205..9caa634 100644
--- a/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/MultipleCallinsWarningTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/MultipleCallinsWarningTest.java
@@ -1,7 +1,7 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  * 
- * Copyright 2011 GK Software AG
+ * Copyright 2011, 2014 GK Software AG
  * 
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -15,7 +15,6 @@
  **********************************************************************/
 package org.eclipse.objectteams.otdt.test.builder;
 
-import static org.eclipse.objectteams.otdt.tests.ClasspathUtil.OTRE_PATH;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -34,6 +33,7 @@
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.tests.builder.Problem;
 import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.objectteams.otdt.tests.ClasspathUtil;
 
 /**
  * Tests for  Bug 314610 - Produce warning when two roles capture the same method at the same time
@@ -59,7 +59,7 @@
 		super.setUp();
 		this.projectPath = env.addProject("MultipleCallinsProject", "1.5"); 
 		env.addExternalJars(projectPath, Util.getJavaClassLibs());
-		env.addExternalJar(projectPath, OTRE_PATH);
+		env.addExternalJar(projectPath, ClasspathUtil.getOTREPath(this.weavingScheme));
 		
 		// remove old package fragment root so that names don't collide
 		env.removePackageFragmentRoot(projectPath, "");
diff --git a/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/OTBuilderTests.java b/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/OTBuilderTests.java
index e791aee..818d66f 100644
--- a/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/OTBuilderTests.java
+++ b/testplugins/org.eclipse.objectteams.otdt.test.builder/src/org/eclipse/objectteams/otdt/test/builder/OTBuilderTests.java
@@ -1,7 +1,7 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  * 
- * Copyright 2004, 2010 Fraunhofer Gesellschaft, Munich, Germany,
+ * Copyright 2004, 2014 Fraunhofer Gesellschaft, Munich, Germany,
  * for its Fraunhofer Institute and Computer Architecture and Software
  * Technology (FIRST), Berlin, Germany and Technical University Berlin,
  * Germany.
@@ -24,6 +24,7 @@
 import org.eclipse.jdt.core.tests.builder.BuilderTests;
 import org.eclipse.jdt.core.tests.builder.Problem;
 import org.eclipse.jdt.core.tests.builder.TestingEnvironment;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 import org.eclipse.objectteams.otdt.internal.compiler.adaptor.BuildManager;
 import org.eclipse.pde.internal.core.PDECoreMessages;
 
@@ -31,6 +32,8 @@
 
 	OTTestingEnvironment otenv;
 
+	WeavingScheme weavingScheme = WeavingScheme.OTRE; // FIXME: test OTDRE, too!
+
 	public OTBuilderTests(String name) {
 		super(name);
 	}
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/TestBase.java b/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/TestBase.java
index 31f96a2..566d58f 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/TestBase.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/TestBase.java
@@ -1,7 +1,7 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  * 
- * Copyright 2004, 2010 Fraunhofer Gesellschaft, Munich, Germany,
+ * Copyright 2004, 2014 Fraunhofer Gesellschaft, Munich, Germany,
  * for its Fraunhofer Institute and Computer Architecture and Software
  * Technology (FIRST), Berlin, Germany and Technical University Berlin,
  * Germany.
@@ -10,7 +10,6 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * $Id: TestBase.java 23494 2010-02-05 23:06:44Z stephan $
  * 
  * Please visit http://www.eclipse.org/objectteams for updates and contact.
  * 
@@ -41,13 +40,13 @@
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.internal.compiler.batch.Main;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 import org.eclipse.objectteams.otdt.tests.ClasspathUtil;
 
 /**
  * This class represents a base for testing the compiler with several files.
  *
  * @author Jan Wloka
- * @version $Id: TestBase.java 23494 2010-02-05 23:06:44Z stephan $
  */
 public class TestBase extends TestCase
 {
@@ -63,7 +62,9 @@
 	
 	public static final String JAVA_HOME = System.getProperty("java.home");
 	public static final String USER_HOME = System.getProperty("user.home");
-	
+
+	private WeavingScheme weavingScheme = WeavingScheme.OTRE; // FIXME: test OTDRE, too!
+
 	public static final String JRE_JAR_PATH;
 	static {
 		String path = JAVA_HOME+File.separator+"lib"+File.separator+"rt.jar";
@@ -190,11 +191,12 @@
 
     private String missingClasspathEntry()
     {
-        File otreJar = new File(ClasspathUtil.OTRE_PATH);
+    	String otrePath = ClasspathUtil.getOTREPath(this.weavingScheme);
+        File otreJar = new File(otrePath);
         File jreJar = new File(JRE_JAR_PATH);
         
         if (!otreJar.exists())
-        	return ClasspathUtil.OTRE_PATH;
+        	return otrePath;
         if (!jreJar.exists())
         	return JRE_JAR_PATH;
         return null;
@@ -493,7 +495,7 @@
         String[] args =
         {
             "-classpath",
-            new Path(ClasspathUtil.OTRE_PATH).toString()
+            new Path(ClasspathUtil.getOTREPath(this.weavingScheme)).toString()
                 		+ File.pathSeparator
                 		+ new Path(JRE_JAR_PATH).toString()
                 		+ File.pathSeparator
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/smap/AbstractSourceMapGeneratorTest.java b/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/smap/AbstractSourceMapGeneratorTest.java
index dda15b6..8cfd0cd 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/smap/AbstractSourceMapGeneratorTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/smap/AbstractSourceMapGeneratorTest.java
@@ -1,10 +1,10 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  * 
- * Copyright 2004, 2010 Fraunhofer Gesellschaft, Munich, Germany,
+ * Copyright 2004, 2014 Fraunhofer Gesellschaft, Munich, Germany,
  * for its Fraunhofer Institute and Computer Architecture and Software
  * Technology (FIRST), Berlin, Germany and Technical University Berlin,
- * Germany.
+ * Germany, and others.
  * 
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -52,6 +52,7 @@
 import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 import org.eclipse.objectteams.otdt.debug.internal.breakpoints.IOOTBreakPoints;
 import org.eclipse.objectteams.otdt.internal.core.compiler.smap.RoleSmapGenerator;
 import org.eclipse.objectteams.otdt.internal.core.compiler.smap.SmapStratum;
@@ -80,7 +81,9 @@
 	public static boolean optimizeStringLiterals = false;

 	public static long sourceLevel = ClassFileConstants.JDK1_5; //$NON-NLS-1$

 

-	public static String OUTPUT_DIR = Util.getOutputDirectory() + File.separator + "smaptest";

+	public static String OUTPUT_DIR = Util.getOutputDirectory() + File.separator + "smaptest";
+	
+	private WeavingScheme weavingScheme = WeavingScheme.OTRE; // FIXME: test OTDRE, too!

 	

 	// the source line within method Team.java:__OT__Confined._OT$getTeam().

 	public static int OT_CONFINED_GET_TEAM_LINE = IOOTBreakPoints.LINE_ConfinedGetTeam;

@@ -174,7 +177,7 @@
     {

 		return Util.concatWithClassLibs(new String[]{
 					getWorkspaceRoot().getLocation().toFile().getCanonicalPath()+'/'+getTestProjectDir()+"/src",
-					ClasspathUtil.OTRE_PATH
+					ClasspathUtil.getOTREPath(this.weavingScheme)
 				},
 				false);
     }

diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java
index e974b04..79d590f 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java
@@ -1,7 +1,7 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  * 
- * Copyright 2010 Stephan Herrmann
+ * Copyright 2010, 2014 Stephan Herrmann
  * 
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -25,7 +25,6 @@
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.tests.compiler.regression.AbstractComparableTest;
 import org.eclipse.jdt.core.tests.compiler.regression.InMemoryNameEnvironment;
 import org.eclipse.jdt.core.tests.compiler.regression.RegressionTestSetup;
@@ -38,10 +37,7 @@
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.jdt.internal.compiler.impl.CompilerOptions.WeavingScheme;
-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;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 import org.eclipse.objectteams.otdt.tests.ClasspathUtil;
 
 /**
@@ -140,16 +136,17 @@
 		super(name);
 	}
 
-	/** Add otre and (bcel or asm) to the class path. */
+	/** Add otre/otdre and (bcel or asm) to the class path. */
 	@Override
 	protected String[] getDefaultClassPaths() {
 		String[] defaults = super.getDefaultClassPaths();
 		int len = defaults.length;
-		int len2 = ClasspathUtil.BYTECODE_LIB_JAR_PATH.length;
+		IPath[] bytecodeLibJarPath = ClasspathUtil.getBytecodeLibJarPath(this.weavingScheme);
+		int len2 = bytecodeLibJarPath.length;
 		System.arraycopy(defaults, 0, defaults=new String[len+1+len2], 0, len);
-		defaults[len] = new Path(ClasspathUtil.OTRE_PATH).toString();
+		defaults[len] = new Path(ClasspathUtil.getOTREPath(this.weavingScheme)).toString();
 		for (int i=0; i<len2; i++)
-			defaults[len+1+i] = ClasspathUtil.BYTECODE_LIB_JAR_PATH[i].toString();
+			defaults[len+1+i] = bytecodeLibJarPath[i].toString();
 		return defaults;
 	}
 
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/DevelopmentExamples.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/DevelopmentExamples.java
index 6536889..a3d50f6 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/DevelopmentExamples.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/DevelopmentExamples.java
@@ -1,7 +1,7 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  * 
- * Copyright 2005-2010 Berlin Institute of Technology, Germany.
+ * Copyright 2005-2014 Berlin Institute of Technology, Germany.
  * 
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -20,8 +20,7 @@
 
 import org.eclipse.jdt.core.tests.util.Util;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.jdt.internal.compiler.impl.CompilerOptions.WeavingScheme;
-import org.eclipse.objectteams.otdt.internal.core.compiler.mappings.CallinImplementorDyn;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 import org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDTest;
 
 import junit.framework.Test;
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/BindingAmbiguities1.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/BindingAmbiguities1.java
index 09d3239..231e107 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/BindingAmbiguities1.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/BindingAmbiguities1.java
@@ -1,7 +1,7 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  * 
- * Copyright 2004, 2010 IT Service Omikron GmbH and others.
+ * Copyright 2004, 2014 IT Service Omikron GmbH and others.
  * 
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -20,8 +20,7 @@
 import java.util.Map;
 
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.jdt.internal.compiler.impl.CompilerOptions.WeavingScheme;
-import org.eclipse.objectteams.otdt.internal.core.compiler.mappings.CallinImplementorDyn;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 import org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDTest;
 
 import junit.framework.Test;
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/TeamNesting.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/TeamNesting.java
index 82db7d5..d954ee0 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/TeamNesting.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/TeamNesting.java
@@ -28,7 +28,7 @@
 	// Static initializer to specify tests subset using TESTS_* static variables
 	// All specified tests which does not belong to the class are skipped...
 	static {
-//		TESTS_NAMES = new String[] { "testBug411450" };
+//		TESTS_NAMES = new String[] { "test1111_roleInheritsCallinFromTsupers1" };
 //		TESTS_NUMBERS = new int[] { 1459 };
 //		TESTS_RANGE = new int[] { 1097, -1 };
 	}
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 06e6203..73841a0 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
@@ -1,13 +1,12 @@
 /**********************************************************************
  * This file is part of "Object Teams Development Tooling"-Software
  * 
- * Copyright 2010 GK Software AG
+ * Copyright 2010, 2014 GK Software AG
  * 
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * $Id$
  * 
  * Please visit http://www.eclipse.org/objectteams for updates and contact.
  * 
@@ -18,16 +17,30 @@
 
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.objectteams.otdt.core.ext.OTDREContainer;
 import org.eclipse.objectteams.otdt.core.ext.OTDTPlugin;
 import org.eclipse.objectteams.otdt.core.ext.OTREContainer;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 
 /** Constants for the classpath of OT/J Projects.*/
 public class ClasspathUtil {
 
 	// === OT Paths: ===
 	public static final String OTDT_PATH 		 = JavaCore.getClasspathVariable(OTDTPlugin.OTDT_INSTALLDIR).toOSString();
-	public static final String OTRE_PATH		 = new OTREContainer().getClasspathEntries()[0].getPath().toOSString();
-	public static final IPath[]  BYTECODE_LIB_JAR_PATH = OTREContainer.BYTECODE_LIBRARY_PATH;
+	public static IPath[] getBytecodeLibJarPath(WeavingScheme weavingScheme) {
+		switch (weavingScheme) {
+		case OTRE : return OTREContainer.BYTECODE_LIBRARY_PATH;
+		case OTDRE : return OTDREContainer.BYTECODE_LIBRARY_PATH;
+		default: throw new IncompatibleClassChangeError("Unexpected enum constant "+weavingScheme);
+		}
+	}
+	public static String getOTREPath(WeavingScheme weavingScheme) {
+		switch (weavingScheme) {
+		case OTRE : return new OTREContainer().getClasspathEntries()[0].getPath().toOSString();
+		case OTDRE : return new OTDREContainer().getClasspathEntries()[0].getPath().toOSString();
+		default: throw new IncompatibleClassChangeError("Unexpected enum constant "+weavingScheme);
+		}
+	}