Adjust to updates of internal API in jdt/pde as of I20181121-1800

Change-Id: Ib3beaaa2f470369cba70a8cf8f5718e2e6d9c616
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/plugin.xml b/plugins/org.eclipse.objectteams.otdt.jdt.ui/plugin.xml
index 031045c..e9d909a 100644
--- a/plugins/org.eclipse.objectteams.otdt.jdt.ui/plugin.xml
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/plugin.xml
@@ -133,11 +133,6 @@
               icon="platform:/plugin/org.eclipse.objectteams.otdt.ui/icons/ot/team_obj.gif">
         </team>
         <team
-              activation="NONE"
-              class="org.eclipse.objectteams.otdt.internal.ui.util.OTStubUtility"
-              icon="platform:/plugin/org.eclipse.objectteams.otdt.ui/icons/ot/team_obj.gif">
-        </team>
-        <team
               activation="ALL_THREADS"
               class="org.eclipse.objectteams.otdt.internal.ui.assist.CreateNewBaseCUProposal"
               icon="platform:/plugin/org.eclipse.objectteams.otdt.ui/icons/ot/team_obj.gif">
@@ -167,6 +162,10 @@
 	     <basePlugin 
               icon="platform:/plugin/org.eclipse.pde.ui/icons/obj16/plugin_obj.png"
               id="org.eclipse.jdt.core.manipulation" />
+		 <team
+               activation="NONE"
+               class="org.eclipse.objectteams.otdt.internal.ui.util.OTStubUtility"
+               icon="platform:/plugin/org.eclipse.objectteams.otdt.ui/icons/ot/team_obj.gif"/>
          <team
                activation="ALL_THREADS"
                class="org.eclipse.objectteams.otdt.internal.corext.BindingHierarchyAdaptor"
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor.java b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor.java
index b7263dd..d85166c 100644
--- a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor.java
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor.java
@@ -86,6 +86,7 @@
 import org.eclipse.osgi.util.NLS;
 
 import base org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2;
+import base org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2Core;
 import base org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroup.JavaLinkedModeProposal;
 import base org.eclipse.jdt.internal.ui.text.java.JavaNoTypeCompletionProposalComputer;
 import base org.eclipse.jdt.internal.ui.text.java.LazyJavaTypeCompletionProposal;
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2.java b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2.java
index dd50878..6149092 100644
--- a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2.java
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2.java
@@ -16,136 +16,29 @@
  **********************************************************************/
 team package org.eclipse.objectteams.otdt.internal.ui.assist.CompletionAdaptor;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.IMethodBinding;
-import org.eclipse.jdt.core.dom.IPackageBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
-import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
 
 /**
  * Add new functions to StubUtility2, accessing otherwise invisible helper functions.
  * @author stephan
  * @since 1.1.2
  */
-@SuppressWarnings({ "unchecked", "rawtypes"/*parameter-less lists from DOM*/, "decapsulation"/*final baseclass + callout-decapsulation*/, "restriction" /*CodeGenerationSettings*/ })
-protected class StubUtility2 playedBy StubUtility2 
+@SuppressWarnings("decapsulation") // base class is final
+protected class StubUtility2 playedBy StubUtility2
 {
 
 	// CALLOUT INTERFACE:
+	@SuppressWarnings("restriction") // internal type CodeGenerationSettings
 	MethodDeclaration createImplementationStub(ICompilationUnit unit, ASTRewrite rewrite, ImportRewrite imports, ImportRewriteContext context,
 			IMethodBinding binding, ITypeBinding targetType, CodeGenerationSettings settings, boolean inInterface, ASTNode astNode)
 		-> MethodDeclaration createImplementationStub(ICompilationUnit unit, ASTRewrite rewrite, ImportRewrite imports, ImportRewriteContext context,
 			IMethodBinding binding, ITypeBinding targetType, CodeGenerationSettings settings, boolean inInterface, ASTNode astNode);
-
-	void findUnimplementedInterfaceMethods(ITypeBinding typeBinding, HashSet<ITypeBinding> visited, ArrayList<IMethodBinding> allMethods, IPackageBinding currPack, ArrayList<IMethodBinding> toImplement) 
-		-> void findUnimplementedInterfaceMethods(ITypeBinding typeBinding, HashSet<ITypeBinding> visited, ArrayList<IMethodBinding> allMethods, IPackageBinding currPack, ArrayList<IMethodBinding> toImplement);
-	IMethodBinding findMethodBinding(IMethodBinding method, List<IMethodBinding> allMethods) 
-		-> IMethodBinding findMethodBinding(IMethodBinding method, List<IMethodBinding> allMethods);
-	
-	/** 
-	 * This callin adds treatment of implicit inheritance including phantom roles
-	 * to it's base version.
-	 */
-	IMethodBinding[] getUnimplementedMethods(ITypeBinding typeBinding, boolean implementAbstractsOfInput) 
-		<- replace IMethodBinding[] getUnimplementedMethods(ITypeBinding typeBinding, boolean implementAbstractsOfInput);
-	@SuppressWarnings("basecall")
-	callin static IMethodBinding[] getUnimplementedMethods(ITypeBinding typeBinding, boolean implementAbstractsOfInput) {
-		// COPY&PASTE from base version:
-		ArrayList allMethods= new ArrayList();
-		ArrayList toImplement= new ArrayList();
-
-		IMethodBinding[] typeMethods= typeBinding.getDeclaredMethods();
-		for (int i= 0; i < typeMethods.length; i++) {
-			IMethodBinding curr= typeMethods[i];
-			int modifiers= curr.getModifiers();
-			if (!curr.isConstructor() && !Modifier.isStatic(modifiers) && !Modifier.isPrivate(modifiers)) {
-//{ObjectTeams: never enter copied methods (have no java element)
-			  if (!curr.isCopied())
-// SH}
-				allMethods.add(curr);
-			}
-		}
-//{ObjectTeams: direct tsuper roles:
-		ITypeBinding[] tsupers= typeBinding.getSuperRoles();
-		  if (tsupers != null)
-			  for (ITypeBinding tsuperRole : tsupers) 
-				  findVisibleVirtualMethods(tsuperRole, allMethods);
-// SH}
-		
-		ITypeBinding superClass= typeBinding.getSuperclass();
-		while (superClass != null) {
-//{ObjectTeams: watch for phantom roles (which don't exist):
-		  if (superClass.getJavaElement().exists()) {
-			  // extracted orig:
-			  findVisibleVirtualMethods(superClass, allMethods);
-		  } else {
-			  // proceed to the existing super of a phantom role:
-			  tsupers= superClass.getSuperRoles();
-			  if (tsupers != null)
-				  for (ITypeBinding tsuperRole : tsupers) 
-					  findVisibleVirtualMethods(tsuperRole, allMethods);
-		  }
-// SH}
-		  superClass= superClass.getSuperclass();
-		}
-
-		for (int i= 0; i < allMethods.size(); i++) {
-			IMethodBinding curr= (IMethodBinding) allMethods.get(i);
-			int modifiers= curr.getModifiers();
-			if ((Modifier.isAbstract(modifiers) || curr.getDeclaringClass().isInterface()) && (implementAbstractsOfInput || typeBinding != curr.getDeclaringClass())) {
-				// implement all abstract methods
-				toImplement.add(curr);
-			}
-		}
-
-		HashSet visited= new HashSet();
-		ITypeBinding curr= typeBinding;
-		while (curr != null) {
-			ITypeBinding[] superInterfaces= curr.getInterfaces();
-			for (int i= 0; i < superInterfaces.length; i++) {
-//{ObjectTeams: consider that a role class part finds its super interfaces in the interface part:
-				if (curr.isClassPartOf(superInterfaces[i])) {
-					// do consider transitively inherited methods:
-					ITypeBinding[] superSuperInterfaces = superInterfaces[i].getInterfaces();
-					for (int j = 0; j < superSuperInterfaces.length; j++)
-						findUnimplementedInterfaceMethods(superSuperInterfaces[j], visited, allMethods, typeBinding.getPackage(), toImplement);
-					// but don't add methods from our own ifc-part (occurs when role extends non-role).
-					continue; 
-				}
-// SH}
-				findUnimplementedInterfaceMethods(superInterfaces[i], visited, allMethods, typeBinding.getPackage(), toImplement);
-			}
-			curr= curr.getSuperclass();
-		}
-
-		return (IMethodBinding[]) toImplement.toArray(new IMethodBinding[toImplement.size()]);
-	}
-	// COPY&PASTE: orig extracted as helper from base of above:
-	private static void findVisibleVirtualMethods(ITypeBinding typeBinding, ArrayList allMethods) {
-		IMethodBinding[] typeMethods= typeBinding.getDeclaredMethods();
-		for (int i= 0; i < typeMethods.length; i++) {
-			IMethodBinding curr= typeMethods[i];
-			int modifiers= curr.getModifiers();
-			if ((!curr.isConstructor() && !Modifier.isStatic(modifiers) && !Modifier.isPrivate(modifiers))
-					|| Modifier.isAbstract(modifiers)) // account for 'abstract static' (partially virtual ;P )
-			{
-			  if (!curr.isCopied()) // new check for OT
-				if (findMethodBinding(curr, allMethods) == null) {
-					allMethods.add(curr);
-				}
-			}
-		}		
-	}
-
 }
 
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2Core.java b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2Core.java
new file mode 100644
index 0000000..c3ae566
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2Core.java
@@ -0,0 +1,138 @@
+/**********************************************************************
+ * This file is part of "Object Teams Development Tooling"-Software
+ * 
+ * Copyright 2007, 2018 Technical University Berlin, 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
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Please visit http://www.eclipse.org/objectteams for updates and contact.
+ * 
+ * Contributors:
+ * 	   Technical University Berlin - Initial API and implementation
+ *     IBM Corporation - implementation of individual method bodies
+ **********************************************************************/
+team package org.eclipse.objectteams.otdt.internal.ui.assist.CompletionAdaptor;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.IMethodBinding;
+import org.eclipse.jdt.core.dom.IPackageBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.Modifier;
+
+/**
+ * Add new functions to StubUtility2Core, accessing otherwise invisible helper functions.
+ * @author stephan
+ * @since 2.7.2 (separated out from sibling StubUtility2 due to code move from jdt.ui to jdt.core.manipulation)
+ */
+@SuppressWarnings({ "unchecked", "rawtypes"/*parameter-less lists from DOM*/, "decapsulation"/*final baseclass + callout-decapsulation*/})
+protected class StubUtility2Core playedBy StubUtility2Core
+{
+
+	// CALLOUT INTERFACE:
+	void findUnimplementedInterfaceMethods(ITypeBinding typeBinding, HashSet<ITypeBinding> visited, ArrayList<IMethodBinding> allMethods, IPackageBinding currPack, ArrayList<IMethodBinding> toImplement) 
+		-> void findUnimplementedInterfaceMethods(ITypeBinding typeBinding, HashSet<ITypeBinding> visited, ArrayList<IMethodBinding> allMethods, IPackageBinding currPack, ArrayList<IMethodBinding> toImplement);
+	IMethodBinding findMethodBinding(IMethodBinding method, List<IMethodBinding> allMethods) 
+		-> IMethodBinding findMethodBinding(IMethodBinding method, List<IMethodBinding> allMethods);
+	
+	/** 
+	 * This callin adds treatment of implicit inheritance including phantom roles
+	 * to it's base version.
+	 */
+	IMethodBinding[] getUnimplementedMethods(ITypeBinding typeBinding, boolean implementAbstractsOfInput) 
+		<- replace IMethodBinding[] getUnimplementedMethods(ITypeBinding typeBinding, boolean implementAbstractsOfInput);
+	@SuppressWarnings("basecall")
+	callin static IMethodBinding[] getUnimplementedMethods(ITypeBinding typeBinding, boolean implementAbstractsOfInput) {
+		// COPY&PASTE from base version:
+		ArrayList allMethods= new ArrayList();
+		ArrayList toImplement= new ArrayList();
+
+		IMethodBinding[] typeMethods= typeBinding.getDeclaredMethods();
+		for (int i= 0; i < typeMethods.length; i++) {
+			IMethodBinding curr= typeMethods[i];
+			int modifiers= curr.getModifiers();
+			if (!curr.isConstructor() && !Modifier.isStatic(modifiers) && !Modifier.isPrivate(modifiers)) {
+//{ObjectTeams: never enter copied methods (have no java element)
+			  if (!curr.isCopied())
+// SH}
+				allMethods.add(curr);
+			}
+		}
+//{ObjectTeams: direct tsuper roles:
+		ITypeBinding[] tsupers= typeBinding.getSuperRoles();
+		  if (tsupers != null)
+			  for (ITypeBinding tsuperRole : tsupers) 
+				  findVisibleVirtualMethods(tsuperRole, allMethods);
+// SH}
+		
+		ITypeBinding superClass= typeBinding.getSuperclass();
+		while (superClass != null) {
+//{ObjectTeams: watch for phantom roles (which don't exist):
+		  if (superClass.getJavaElement().exists()) {
+			  // extracted orig:
+			  findVisibleVirtualMethods(superClass, allMethods);
+		  } else {
+			  // proceed to the existing super of a phantom role:
+			  tsupers= superClass.getSuperRoles();
+			  if (tsupers != null)
+				  for (ITypeBinding tsuperRole : tsupers) 
+					  findVisibleVirtualMethods(tsuperRole, allMethods);
+		  }
+// SH}
+		  superClass= superClass.getSuperclass();
+		}
+
+		for (int i= 0; i < allMethods.size(); i++) {
+			IMethodBinding curr= (IMethodBinding) allMethods.get(i);
+			int modifiers= curr.getModifiers();
+			if ((Modifier.isAbstract(modifiers) || curr.getDeclaringClass().isInterface()) && (implementAbstractsOfInput || typeBinding != curr.getDeclaringClass())) {
+				// implement all abstract methods
+				toImplement.add(curr);
+			}
+		}
+
+		HashSet visited= new HashSet();
+		ITypeBinding curr= typeBinding;
+		while (curr != null) {
+			ITypeBinding[] superInterfaces= curr.getInterfaces();
+			for (int i= 0; i < superInterfaces.length; i++) {
+//{ObjectTeams: consider that a role class part finds its super interfaces in the interface part:
+				if (curr.isClassPartOf(superInterfaces[i])) {
+					// do consider transitively inherited methods:
+					ITypeBinding[] superSuperInterfaces = superInterfaces[i].getInterfaces();
+					for (int j = 0; j < superSuperInterfaces.length; j++)
+						findUnimplementedInterfaceMethods(superSuperInterfaces[j], visited, allMethods, typeBinding.getPackage(), toImplement);
+					// but don't add methods from our own ifc-part (occurs when role extends non-role).
+					continue; 
+				}
+// SH}
+				findUnimplementedInterfaceMethods(superInterfaces[i], visited, allMethods, typeBinding.getPackage(), toImplement);
+			}
+			curr= curr.getSuperclass();
+		}
+
+		return (IMethodBinding[]) toImplement.toArray(new IMethodBinding[toImplement.size()]);
+	}
+	// COPY&PASTE: orig extracted as helper from base of above:
+	private static void findVisibleVirtualMethods(ITypeBinding typeBinding, ArrayList allMethods) {
+		IMethodBinding[] typeMethods= typeBinding.getDeclaredMethods();
+		for (int i= 0; i < typeMethods.length; i++) {
+			IMethodBinding curr= typeMethods[i];
+			int modifiers= curr.getModifiers();
+			if ((!curr.isConstructor() && !Modifier.isStatic(modifiers) && !Modifier.isPrivate(modifiers))
+					|| Modifier.isAbstract(modifiers)) // account for 'abstract static' (partially virtual ;P )
+			{
+			  if (!curr.isCopied()) // new check for OT
+				if (findMethodBinding(curr, allMethods) == null) {
+					allMethods.add(curr);
+				}
+			}
+		}		
+	}
+}
+
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/util/OTStubUtility.java b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/util/OTStubUtility.java
index 12adc31..d533834 100644
--- a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/util/OTStubUtility.java
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/util/OTStubUtility.java
@@ -43,7 +43,7 @@
 import org.eclipse.jdt.internal.core.manipulation.StubUtility;
 import org.eclipse.jdt.core.manipulation.CodeGeneration;
 
-import base org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2;
+import base org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2Core;
 
 /**
  * OT-Extension for {@link org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2}.
@@ -55,7 +55,7 @@
 	private static OTStubUtility instance;
 
 	@SuppressWarnings("decapsulation")
-	protected class StubUtility2 playedBy StubUtility2 {
+	protected class StubUtility2 playedBy StubUtility2Core {
 
 		protected List createParameters(IJavaProject project, ImportRewrite imports,
 				ImportRewriteContext context, AST ast, IMethodBinding binding,
diff --git a/plugins/org.eclipse.objectteams.otdt.pde.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.objectteams.otdt.pde.ui/META-INF/MANIFEST.MF
index fdeeac4..94c36ad 100644
--- a/plugins/org.eclipse.objectteams.otdt.pde.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.objectteams.otdt.pde.ui/META-INF/MANIFEST.MF
@@ -21,7 +21,8 @@
  org.eclipse.objectteams.otdt;bundle-version="[2.5.0,3.0.0)",
  org.eclipse.objectteams.otdt.debug;bundle-version="[2.3.0,3.0.0)",
  org.eclipse.objectteams.otequinox;bundle-version="[2.5.0,3.0.0)",
- org.eclipse.objectteams.otdt.ui;bundle-version="[2.5.0,3.0.0)"
+ org.eclipse.objectteams.otdt.ui;bundle-version="[2.5.0,3.0.0)",
+ org.eclipse.pde.core
 Bundle-ActivationPolicy: lazy
 Bundle-Localization: plugin
 Export-Package: org.eclipse.objectteams.otdt.internal.migration;x-internal:=true,
diff --git a/plugins/org.eclipse.objectteams.otdt.pde.ui/src/org/eclipse/objectteams/otdt/internal/migration/OTEquinoxMigration.java b/plugins/org.eclipse.objectteams.otdt.pde.ui/src/org/eclipse/objectteams/otdt/internal/migration/OTEquinoxMigration.java
index 425a222..5e22d60 100644
--- a/plugins/org.eclipse.objectteams.otdt.pde.ui/src/org/eclipse/objectteams/otdt/internal/migration/OTEquinoxMigration.java
+++ b/plugins/org.eclipse.objectteams.otdt.pde.ui/src/org/eclipse/objectteams/otdt/internal/migration/OTEquinoxMigration.java
@@ -81,7 +81,7 @@
 
 		int getLine(Element element) -> int getLine(Element element);
 		
-		removeMarkers <- before validateContent;
+		removeMarkers <- before validate;
 		
 		void removeMarkers() {			
 			MigrationMarkers.removeMarkers(getFFile(), 
diff --git a/plugins/org.eclipse.objectteams.otdt.pde.ui/src/org/eclipse/objectteams/otdt/internal/pde/validation/BundleValidation.java b/plugins/org.eclipse.objectteams.otdt.pde.ui/src/org/eclipse/objectteams/otdt/internal/pde/validation/BundleValidation.java
index 0982bb5..90f691b 100644
--- a/plugins/org.eclipse.objectteams.otdt.pde.ui/src/org/eclipse/objectteams/otdt/internal/pde/validation/BundleValidation.java
+++ b/plugins/org.eclipse.objectteams.otdt.pde.ui/src/org/eclipse/objectteams/otdt/internal/pde/validation/BundleValidation.java
@@ -46,6 +46,7 @@
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.core.builders.CompilerFlags;
 import org.eclipse.pde.internal.core.builders.IHeader;
+import org.eclipse.pde.internal.core.builders.IncrementalErrorReporter.VirtualMarker;
 import org.eclipse.pde.internal.core.builders.PDEMarkerFactory;
 import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
 import org.eclipse.pde.internal.core.text.bundle.BundleActivationPolicyHeader;
@@ -149,8 +150,8 @@
 		State getState() -> get IPluginModelBase fModel
 			with { result <- fModel.getBundleDescription().getContainingState() }
 		
-		IMarker report(String message, int line, int severity, int fixId, String category)
-		-> IMarker report(String message, int line, int severity, int fixId, String category);
+		VirtualMarker report(String message, int line, int severity, int fixId, String category)
+		-> VirtualMarker report(String message, int line, int severity, int fixId, String category);
 
 		@SuppressWarnings("decapsulation")
 		int getLine(Element element) -> int getLine(Element element);
@@ -283,17 +284,16 @@
 			String packageName = teamName.substring(0, lastDot);
 			String actualPackage = getContainingPackage(context, packageName);
 			if (packageName != actualPackage) {
-				IMarker marker = report(NLS.bind(OTPDEUIMessages.Validation_NotAPackage_error, packageName),
+				VirtualMarker marker = report(NLS.bind(OTPDEUIMessages.Validation_NotAPackage_error, packageName),
 						   getLine(teamNode, CLASS), 
 						   CompilerFlags.ERROR,
 						   CHANGE_DOT_TO_DOLLAR,
 						   PDEMarkerFactory.CAT_FATAL);
-				if (marker != null)
-					try {
-						marker.setAttribute("package", actualPackage); //$NON-NLS-1$
-						marker.setAttribute("team", teamName); //$NON-NLS-1$
-						marker.setAttribute(PDEMarkerFactory.MPK_LOCATION_PATH, generateLocationPath(teamNode, CLASS));
-					} catch (CoreException e) { /* nop */ }
+				if (marker != null) {
+					marker.setAttribute("package", actualPackage); //$NON-NLS-1$
+					marker.setAttribute("team", teamName); //$NON-NLS-1$
+					marker.setAttribute(PDEMarkerFactory.MPK_LOCATION_PATH, generateLocationPath(teamNode, CLASS));
+				}
 			}
 			return actualPackage;
 		}
@@ -368,12 +368,12 @@
 			base when (BundleValidation.this.bundleContext.get().isAspectBundle)
 	{			
 		@SuppressWarnings("decapsulation")
-		void addMarkerAttribute(IMarker marker, String attr, String val)
-			-> void addMarkerAttribute(IMarker marker, String attr, String val);
+		void addMarkerAttribute(VirtualMarker marker, String attr, String val)
+			-> void addMarkerAttribute(VirtualMarker marker, String attr, String val);
 		@SuppressWarnings("decapsulation")
 		IHeader getHeader(String key) -> IHeader getHeader(String key);
-		IMarker report(String message, int line, int severity, int resolution, String category) 
-			-> IMarker report(String message, int line, int severity, int resolution, String category);
+		VirtualMarker report(String message, int line, int severity, int resolution, String category) 
+			-> VirtualMarker report(String message, int line, int severity, int resolution, String category);
 		
 		void validateBundleActivatorPolicy() <- after void validateBundleActivatorPolicy();
 		
@@ -406,7 +406,7 @@
 					needingExport.remove(elements[i].getValue());
 			}
 			for (String unmatched : needingExport) {
-				IMarker marker = report(NLS.bind(OTPDEUIMessages.Validation_MissingAspectPackageExport_error, unmatched), 
+				VirtualMarker marker = report(NLS.bind(OTPDEUIMessages.Validation_MissingAspectPackageExport_error, unmatched), 
 						   1, 
 						   CompilerFlags.ERROR, 	// can reduce severity when we have the option to add the export at runtime 
 						   ADD_PACKAGE_EXPORT, 
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/AddUnimplementedMethodsTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/AddUnimplementedMethodsTest.java
index f835ce6..7ae9cbe 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/AddUnimplementedMethodsTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/AddUnimplementedMethodsTest.java
@@ -41,6 +41,7 @@
 import org.eclipse.jdt.internal.corext.codemanipulation.AddUnimplementedMethodsOperation;
 import org.eclipse.jdt.internal.core.manipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2;
+import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2Core;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.util.RefactoringASTParser;
@@ -148,7 +149,7 @@
 		ITypeBinding binding= declaration.resolveBinding();
 		assertNotNull("Binding for type declaration could not be resolved", binding);
 		
-		IMethodBinding[] overridableMethods= implementAllOverridable ? StubUtility2.getOverridableMethods(unit.getAST(), binding, false) : null;
+		IMethodBinding[] overridableMethods= implementAllOverridable ? StubUtility2Core.getOverridableMethods(unit.getAST(), binding, false) : null;
 		
 		AddUnimplementedMethodsOperation op= new AddUnimplementedMethodsOperation(unit, binding, overridableMethods, insertionPos, true, true, true);
 		op.run(new NullProgressMonitor());