start adapting jdt.ui.tests.refactoring using a team, rather than inline patching
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.classpath b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.classpath
index 4848249..48a5adf 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.classpath
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.classpath
@@ -1,7 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<classpath>

-	<classpathentry kind="src" path="src"/>

-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

-	<classpathentry kind="output" path="bin"/>

-</classpath>

+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="OTRE"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.project b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.project
index f658ae3..96f1c33 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.project
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.project
@@ -6,7 +6,7 @@
 	</projects>
 	<buildSpec>
 		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
+			<name>org.eclipse.objectteams.otdt.builder.OTJBuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
@@ -24,5 +24,6 @@
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.objectteams.otdt.OTJavaNature</nature>
 	</natures>
 </projectDescription>
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0bb4faa
--- /dev/null
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,67 @@
+#Mon Sep 27 21:07:11 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/META-INF/MANIFEST.MF b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/META-INF/MANIFEST.MF
index 68b559a..f75dbf6 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/META-INF/MANIFEST.MF
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/META-INF/MANIFEST.MF
@@ -1,34 +1,36 @@
-Manifest-Version: 1.0

-Bundle-ManifestVersion: 2

-Bundle-Name: OT Refactoring Test Plug-in

-Bundle-SymbolicName: org.eclipse.objectteams.otdt.ui.tests.refactoring;singleton:=true

-Bundle-Version: 1.3.0

-Bundle-ClassPath: otrefactoringtests.jar

-Bundle-Activator: org.eclipse.objectteams.otdt.ui.tests.refactoring.OTRefactoringTestPlugin

-Bundle-Vendor: The TOPPrax consortium

-Require-Bundle: org.eclipse.core.runtime,

- org.eclipse.core.resources,

- org.eclipse.jdt.core,

- org.eclipse.jdt.ui,

- org.eclipse.ui,

- org.eclipse.ui.ide,

- org.eclipse.jface.text,

- org.eclipse.ltk.core.refactoring,

- org.junit,

- org.eclipse.jdt.core.tests.compiler,

- org.eclipse.jdt.ui.tests.refactoring,

- org.eclipse.objectteams.otdt.ui.tests,

- org.eclipse.objectteams.otdt.tests,

- org.eclipse.test.performance,

- org.eclipse.objectteams.otdt.refactoring,

- org.eclipse.jdt.core.manipulation,

- org.eclipse.jdt.ui.tests

-Bundle-ActivationPolicy: lazy

-Export-Package: org.eclipse.objectteams.otdt.ui.tests.refactoring,

- org.eclipse.objectteams.otdt.ui.tests.refactoring.extractmethod,

- org.eclipse.objectteams.otdt.ui.tests.refactoring.move,

- org.eclipse.objectteams.otdt.ui.tests.refactoring.rename,

- org.eclipse.objectteams.otdt.ui.tests.refactoring.reorg,

- org.eclipse.objectteams.otdt.ui.tests.refactoring.requiredfeatures,

- org.eclipse.objectteams.otdt.ui.tests.refactoring.util

-Bundle-RequiredExecutionEnvironment: J2SE-1.5

+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: OT Refactoring Test Plug-in
+Bundle-SymbolicName: org.eclipse.objectteams.otdt.ui.tests.refactoring;singleton:=true
+Bundle-Version: 1.3.0
+Bundle-ClassPath: otrefactoringtests.jar
+Bundle-Activator: org.eclipse.objectteams.otdt.ui.tests.refactoring.OTRefactoringTestPlugin
+Bundle-Vendor: The TOPPrax consortium
+Export-Package: org.eclipse.objectteams.otdt.ui.tests.refactoring,
+ org.eclipse.objectteams.otdt.ui.tests.refactoring.extractmethod,
+ org.eclipse.objectteams.otdt.ui.tests.refactoring.move,
+ org.eclipse.objectteams.otdt.ui.tests.refactoring.rename,
+ org.eclipse.objectteams.otdt.ui.tests.refactoring.reorg,
+ org.eclipse.objectteams.otdt.ui.tests.refactoring.requiredfeatures,
+ org.eclipse.objectteams.otdt.ui.tests.refactoring.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.eclipse.jdt.ui,
+ org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.jface.text,
+ org.eclipse.ltk.core.refactoring,
+ org.junit,
+ org.eclipse.jdt.core.tests.compiler,
+ org.eclipse.jdt.ui.tests.refactoring,
+ org.eclipse.objectteams.otdt.ui.tests,
+ org.eclipse.objectteams.otdt.tests,
+ org.eclipse.test.performance,
+ org.eclipse.objectteams.otdt.refactoring,
+ org.eclipse.jdt.core.manipulation,
+ org.eclipse.jdt.ui.tests,
+ org.eclipse.objectteams.otequinox,
+ org.eclipse.objectteams.otequinox
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/build.properties b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/build.properties
index 5661e45..ff44f7e 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/build.properties
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/build.properties
@@ -6,5 +6,6 @@
                test.xml,\

                META-INF/,\

                workspace/,\

-               JCL/

+               JCL/,\

+               plugin.xml

 src.includes = src/

diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/plugin.xml b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/plugin.xml
new file mode 100644
index 0000000..a0eaa6d
--- /dev/null
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.objectteams.otequinox.aspectBindings">
+      <aspectBinding
+            icon="platform:/plugin/org.eclipse.objectteams.otdt.ui/icons/ot/calloutbinding_obj.gif">
+         <basePlugin
+               icon="platform:/plugin/org.eclipse.pde.ui/icons/obj16/plugin_obj.gif"
+               id="org.eclipse.jdt.ui.tests.refactoring">
+         </basePlugin>
+         <team
+               activation="ALL_THREADS"
+               class="org.eclipse.objectteams.otdt.ui.tests.refactoring.JdtTests"
+               icon="platform:/plugin/org.eclipse.objectteams.otdt.ui/icons/ot/team_obj.gif">
+         </team>
+      </aspectBinding>
+   </extension>
+
+</plugin>
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/src/org/eclipse/objectteams/otdt/ui/tests/refactoring/JdtTests.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/src/org/eclipse/objectteams/otdt/ui/tests/refactoring/JdtTests.java
new file mode 100644
index 0000000..c39b1d1
--- /dev/null
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring/src/org/eclipse/objectteams/otdt/ui/tests/refactoring/JdtTests.java
@@ -0,0 +1,67 @@
+/**********************************************************************
+ * This file is part of "Object Teams Development Tooling"-Software
+ * 
+ * Copyright 2010 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.
+ * 
+ * Contributors:
+ * 	  Stephan Herrmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.objectteams.otdt.ui.tests.refactoring;
+
+import java.io.IOException;
+
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.internal.corext.refactoring.ParameterInfo;
+
+import base org.eclipse.jdt.ui.tests.refactoring.ChangeSignatureTests;
+
+@SuppressWarnings("restriction")
+public team class JdtTests {
+	
+	protected team class ChangeSignature playedBy ChangeSignatureTests {
+		
+		final static String OT_NAME = "a_of_string";
+		
+		testGenerics04 <- replace testGenerics04;
+		
+		@SuppressWarnings({ "inferredcallout", "basecall", "decapsulation" })
+		callin void testGenerics04() throws Exception {
+			String[] signature= {"QList<QInteger;>;", "QA<QString;>;"};
+			String[] newNames= {"li"};
+			String[] newTypes= {"List<Integer>"};
+			String[] newDefaultValues= {"null"};
+			ParameterInfo[] newParamInfo= createNewParamInfos(newTypes, newNames, newDefaultValues);
+			int[] newIndices= {2};
+
+//{ObjectTeams: avoid keyword "as" - renamed to "a_of_string"	
+			String[] oldParamNames= {"li", OT_NAME};
+			String[] newParamNames= {"li", OT_NAME};
+// SH}
+			String[] newParameterTypeNames= null;
+			int[] permutation= {1, 2, 0};
+			int[] deletedIndices= {0};
+			int newVisibility= Modifier.PUBLIC;
+			String newReturnTypeName= null;
+			within (this) // OT: enable nested role ContentPatching
+				helperDoAll("A", "m", signature, newParamInfo, newIndices, oldParamNames, newParamNames, newParameterTypeNames, permutation, newVisibility, deletedIndices, newReturnTypeName);
+		}
+		
+		protected class ContentPatching playedBy RefactoringTest {
+
+			String getFileContents(String fileName) <- replace String getFileContents(String fileName);
+
+			static callin String getFileContents(String fileName) throws IOException {
+				String orig = base.getFileContents(fileName);
+				return orig.replaceAll("as", OT_NAME);
+			}			
+		}
+	}
+}