Fix bundle boundary after ecj extraction
+ No access to IPath, IVerificationTypeInfo, CompletionOn*, JavaCore,
  IStatus/Status
+ Move SelectionNodeFound for use in TypeReference
diff --git a/org.eclipse.jdt.core.compiler.batch/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.compiler.batch/META-INF/MANIFEST.MF
index 0f72df9..a6e4917 100644
--- a/org.eclipse.jdt.core.compiler.batch/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.compiler.batch/META-INF/MANIFEST.MF
@@ -14,6 +14,7 @@
  org.eclipse.jdt.core.compiler,
  org.eclipse.jdt.core.compiler.batch,
  org.eclipse.jdt.internal.antadapter;x-friends:="org.eclipse.jdt.core",
+ org.eclipse.jdt.internal.codeassist.select;x-friends:="org.eclipse.jdt.core",
  org.eclipse.jdt.internal.compiler;x-friends:="org.eclipse.jdt.core",
  org.eclipse.jdt.internal.compiler.apt.dispatch;x-friends:="org.eclipse.jdt.apt.pluggable.core,org.eclipse.jdt.core",
  org.eclipse.jdt.internal.compiler.apt.model;x-friends:="org.eclipse.jdt.apt.pluggable.core,org.eclipse.jdt.core",
@@ -31,6 +32,8 @@
  org.eclipse.jdt.internal.compiler.problem;x-friends:="org.eclipse.jdt.core",
  org.eclipse.jdt.internal.compiler.tool;x-friends:="org.eclipse.jdt.compiler.tool.tests,org.eclipse.jdt.core",
  org.eclipse.jdt.internal.compiler.util;x-friends:="org.eclipse.jdt.core.internal.tools,org.eclipse.jdt.core",
+ org.eclipse.objectteams.otdt.core.compiler;x-friends:="org.eclipse.jdt.core,org.eclipse.objectteams.otdt",
+ org.eclipse.objectteams.otdt.core.exceptions;x-friends:="org.eclipse.jdt.core",
  org.eclipse.objectteams.otdt.internal.core.compiler.ast;x-friends:="org.eclipse.jdt.core,org.eclipse.jdt.core.tests.compiler",
  org.eclipse.objectteams.otdt.internal.core.compiler.bytecode;x-friends:="org.eclipse.objectteams.otdt.compiler.adaptor",
  org.eclipse.objectteams.otdt.internal.core.compiler.control;x-friends:="org.eclipse.objectteams.otdt.tests,org.eclipse.objectteams.otdt.apt",
@@ -43,6 +46,4 @@
  org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.copyinheritance;x-friends:="org.eclipse.objectteams.otdt.compiler.adaptor",
  org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transformer;x-internal:=true,
  org.eclipse.objectteams.otdt.internal.core.compiler.util;x-internal:=true,
- org.eclipse.objectteams.otdt.core.compiler;x-friends:="org.eclipse.jdt.core,org.eclipse.objectteams.otdt",
- org.eclipse.objectteams.otdt.core.exceptions;x-friends:="org.eclipse.jdt.core",
  META-INF.services
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionNodeFound.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/codeassist/select/SelectionNodeFound.java
similarity index 100%
rename from org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionNodeFound.java
rename to org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/codeassist/select/SelectionNodeFound.java
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/CompilationResult.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/CompilationResult.java
index 11c8ed3..2666c5f 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/CompilationResult.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/CompilationResult.java
@@ -56,7 +56,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.eclipse.core.runtime.IPath;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.core.compiler.CategorizedProblem;
 import org.eclipse.jdt.core.compiler.CharOperation;
@@ -118,9 +117,6 @@
 		}
 		return packagePathName;
 	}
-	public IPath stripTeamPackagesFromPath(IPath packagePath) {
-		return packagePath.removeLastSegments(this.roleFileDepth);
-	}
 	// remember which binary types have been added to the source type,
 	// in order not to delete the class file which is still needed!
 	private ArrayList<char[]> binaryMemberNames = null;
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/BytecodeTransformer.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/BytecodeTransformer.java
index 4ea8214..98d61f5 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/BytecodeTransformer.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/BytecodeTransformer.java
@@ -24,7 +24,6 @@
 import java.util.Iterator;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
-import org.eclipse.jdt.core.util.IVerificationTypeInfo;
 import org.eclipse.jdt.internal.compiler.ClassFile;
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
@@ -66,6 +65,9 @@
 public class BytecodeTransformer
         implements AttributeNamesConstants, ClassFileConstants
 {
+	// FORWARD DECLRATIONS FROM org.eclipse.jdt.core.util.IVerificationTypeInfo:
+	public static final int ITEM_OBJECT = 7;
+	public static final int ITEM_UNINITIALIZED = 8;
 
     private ConstantPoolObjectReader _reader;
     private ConstantPoolObjectWriter _writer;
@@ -1122,11 +1124,11 @@
 		final int t = (codeToAdjust[offset] & 0xFF);
 		int readOffset = 1;
 		switch(t) {
-			case IVerificationTypeInfo.ITEM_OBJECT :
+			case ITEM_OBJECT :
 				updateCPO(null, codeToAdjust, offset+1, 2);
 				readOffset += 2;
 				break;
-			case IVerificationTypeInfo.ITEM_UNINITIALIZED :
+			case ITEM_UNINITIALIZED :
 				readOffset += 2;
 		}
 		return readOffset;
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/control/Config.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/control/Config.java
index a5beedb..e1dde5c 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/control/Config.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/control/Config.java
@@ -30,9 +30,6 @@
 import java.util.Stack;
 import java.util.WeakHashMap;
 
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.internal.compiler.Compiler;
 import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration;
@@ -62,10 +59,10 @@
 			super(string);
 		}
 		public void logWarning(String msg) {
-			try {
-				JavaCore.getJavaCore().getLog().log(new Status(IStatus.WARNING, JavaCore.PLUGIN_ID, msg, this));
-			} catch (NoClassDefFoundError ncdfe) {
-				System.err.println("Warning: "+msg); //$NON-NLS-1$
+			if (logger != null) {
+				logger.warn(msg, this);
+			} else {
+				System.err.println("OT/J Warning: "+msg); //$NON-NLS-1$
 				this.printStackTrace(System.err);
 			}
 		}
@@ -615,11 +612,12 @@
 		logger = aLogger;
 	}
 	public static synchronized void logException(String message, Throwable exception) {
-		if (logger != null)
+		if (logger != null) {
 			logger.logException(message, exception);
-		else
+		} else {
 			System.err.println("OT/J: "+message); //$NON-NLS-1$
 			exception.printStackTrace(System.err);
+		}
 	}
 
 	public boolean clientHasExactClass(Class<?> clazz) {
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/control/ILogger.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/control/ILogger.java
index 604beab..43c0511 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/control/ILogger.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/control/ILogger.java
@@ -2,4 +2,5 @@
 
 public interface ILogger {
 	void logException(String message, Throwable exception);
+	void warn(String message, Exception exception);
 }
diff --git a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleSplitter.java b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleSplitter.java
index 8438a8d..a58e8cc 100644
--- a/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleSplitter.java
+++ b/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleSplitter.java
@@ -33,9 +33,6 @@
 import static org.eclipse.objectteams.otdt.core.compiler.IOTConstants.OT_DELIM_NAME;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
-import org.eclipse.jdt.internal.codeassist.complete.CompletionOnKeyword;
-import org.eclipse.jdt.internal.codeassist.complete.CompletionOnQualifiedTypeReference;
-import org.eclipse.jdt.internal.codeassist.complete.CompletionOnSingleTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
@@ -272,15 +269,13 @@
 	private static void renameSuperReference(TypeDeclaration classTypeDeclaration){
 		TypeReference reference = classTypeDeclaration.superclass;
         if (reference != null) {
-        	try {
-	        	if (reference instanceof CompletionOnKeyword)
+        	switch (reference.getClass().getName()) {
+        		case "CompletionOnKeyword": //$NON-NLS-1$
 	        		return; // not a real type reference!
-	        	if (reference instanceof CompletionOnSingleTypeReference)
+        		case "CompletionOnSingleTypeReference": //$NON-NLS-1$
 	        		return; // inserting __OT__ here would break completion
-	        	if (reference instanceof CompletionOnQualifiedTypeReference)
+        		case "CompletionOnQualifiedTypeReference": //$NON-NLS-1$
 	        		return; // inserting __OT__ here would break completion
-        	} catch (NoClassDefFoundError e) {
-        		// ignore this because batch mode has no CompletionnOnKeyword.
         	}
             if(reference instanceof SingleTypeReference){
                 SingleTypeReference singRef = (SingleTypeReference)reference;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
index 5fa327a..c1f458e 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
@@ -3448,6 +3448,10 @@
 			public void logException(String message, Throwable exception) {
 				JavaCore.this.getLog().log(new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, 0, message, exception));
 			}
+			@Override
+			public void warn(String message, Exception exception) {
+				JavaCore.this.getLog().log(new Status(IStatus.WARNING, JavaCore.PLUGIN_ID, 0, message, exception));
+			}
 		});
 // SH}
 	}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
index bb82ffc..80b72a4 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
@@ -764,7 +764,7 @@
 			int count = sourceFile.sourceLocation.sourceFolder.getFullPath().segmentCount();
 			packagePath = sourceFile.resource.getFullPath().removeFirstSegments(count).removeLastSegments(1);
 //{ObjectTeams: consider rolefiles/teampackages:
-			packagePath= result.stripTeamPackagesFromPath(packagePath);
+			packagePath= packagePath.removeLastSegments(result.roleFileDepth);
 // SH}
 		}
 //{ObjectTeams: inner classes whose binaries have successfully been reused are not to be deleted!