Initial implementation for Bug 310923 -  [assist] Quick assist for adding/removing signatures in method bindings
(see comment 1, comment 2).
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/CallinQuickFixTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/CallinQuickFixTest.java
index 003cd38..cec6619 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/CallinQuickFixTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/CallinQuickFixTest.java
@@ -22,6 +22,7 @@
 
 import java.util.ArrayList;
 import java.util.Hashtable;
+import java.util.List;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
@@ -30,10 +31,11 @@
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.internal.ui.text.correction.AssistContext;
 import org.eclipse.objectteams.otdt.core.ext.OTDTPlugin;
 
 /**
- * Test OT-specific quickfixes (here: callin related issues).
+ * Test OT-specific quickfixes and quick assist (here: callin related issues).
  * @author stephan
  * @since 1.2.8
  */
@@ -173,5 +175,95 @@
 		assertExpectedExistInProposals(proposals, expectedProposals);
 	}
 
+	/* Remove signatures from a callin binding. */
+	public void testRemoveSignatures1() throws Exception {
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class B1 {\n");
+		buf.append("    public void foo(String val) {};\n");
+		buf.append("}\n");
+		pack1.createCompilationUnit("B1.java", buf.toString(), false, null);
+
+		buf = new StringBuffer();
+		buf.append("package test1;\n");	
+		buf.append("public team class T1 {\n");
+		buf.append("    protected class R playedBy B1 {\n");
+		buf.append("        @SuppressWarnings(\"basecall\") void foo() {\n");
+		buf.append("        	System.out.print(\"OK\");\n");
+		buf.append("		}\n");
+		buf.append("		void foo() <- after void foo(String val);\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cuteam = pack1.createCompilationUnit("T1.java", buf.toString(), false, null);
+		
+		int offset= buf.toString().indexOf("foo() <- after");
+		AssistContext context= getCorrectionContext(cuteam, offset, 0);
+		List proposals= collectAssists(context, false);
+
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		String[] expectedProposals = new String[1];
+		buf= new StringBuffer();
+		buf.append("package test1;\n");	
+		buf.append("public team class T1 {\n");
+		buf.append("    protected class R playedBy B1 {\n");
+		buf.append("        @SuppressWarnings(\"basecall\") void foo() {\n");
+		buf.append("        	System.out.print(\"OK\");\n");
+		buf.append("		}\n");
+		buf.append("		foo <- after foo;\n"); // removed signatures
+		buf.append("    }\n");
+		buf.append("}\n");
+		expectedProposals[0] = buf.toString();
+
+		assertExpectedExistInProposals(proposals, expectedProposals);
+	}
+
+
+	/* Remove signatures from a callin binding. */
+	public void testAddSignatures1() throws Exception {
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class B1 {\n");
+		buf.append("    public void foo(String val) {};\n");
+		buf.append("}\n");
+		pack1.createCompilationUnit("B1.java", buf.toString(), false, null);
+
+		buf = new StringBuffer();
+		buf.append("package test1;\n");	
+		buf.append("public team class T1 {\n");
+		buf.append("    protected class R playedBy B1 {\n");
+		buf.append("        @SuppressWarnings(\"basecall\") void foo() {\n");
+		buf.append("        	System.out.print(\"OK\");\n");
+		buf.append("		}\n");
+		buf.append("		foo <- after foo;\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cuteam = pack1.createCompilationUnit("T1.java", buf.toString(), false, null);
+		
+		int offset= buf.toString().indexOf("foo <- after");
+		AssistContext context= getCorrectionContext(cuteam, offset, 0);
+		List proposals= collectAssists(context, false);
+
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		String[] expectedProposals = new String[1];
+		buf= new StringBuffer();
+		buf.append("package test1;\n");	
+		buf.append("public team class T1 {\n");
+		buf.append("    protected class R playedBy B1 {\n");
+		buf.append("        @SuppressWarnings(\"basecall\") void foo() {\n");
+		buf.append("        	System.out.print(\"OK\");\n");
+		buf.append("		}\n");
+		buf.append("		void foo() <- after void foo(String val);\n"); // added signatures
+		buf.append("    }\n");
+		buf.append("}\n");
+		expectedProposals[0] = buf.toString();
+
+		assertExpectedExistInProposals(proposals, expectedProposals);
+	}
 
 }
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/CalloutQuickFixTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/CalloutQuickFixTest.java
index 574ae7d..1f75b90 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/CalloutQuickFixTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests/src/org/eclipse/objectteams/otdt/ui/tests/core/CalloutQuickFixTest.java
@@ -22,6 +22,7 @@
 
 import java.util.ArrayList;
 import java.util.Hashtable;
+import java.util.List;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
@@ -30,10 +31,11 @@
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.internal.ui.text.correction.AssistContext;
 import org.eclipse.objectteams.otdt.core.ext.OTDTPlugin;
 
 /**
- * Test OT-specific quickfixes (here: callout related issues).
+ * Test OT-specific quickfixes and quick assists (here: callout related issues).
  * @author stephan
  * @since 1.2.8
  */
@@ -414,4 +416,129 @@
 
 		assertExpectedExistInProposals(proposals, expectedProposals);
 	}
+	
+
+	/* Remove signatures from a callout to field. */
+	public void testRemoveSignatures1() throws Exception {
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class B1 {\n");
+		buf.append("    String foo;\n");
+		buf.append("}\n");
+		pack1.createCompilationUnit("B1.java", buf.toString(), false, null);
+
+		buf = new StringBuffer();
+		buf.append("package test1;\n");	
+		buf.append("public team class T1 {\n");
+		buf.append("    protected class R playedBy B1 {\n");
+		buf.append("        abstract String getFoo();\n");
+		buf.append("		String getFoo() -> get String foo;\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cuteam = pack1.createCompilationUnit("T1.java", buf.toString(), false, null);
+		
+		int offset= buf.toString().indexOf("getFoo() -> get");
+		AssistContext context= getCorrectionContext(cuteam, offset, 0);
+		List proposals= collectAssists(context, false);
+
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		String[] expectedProposals = new String[1];
+		buf= new StringBuffer();
+		buf.append("package test1;\n");	
+		buf.append("public team class T1 {\n");
+		buf.append("    protected class R playedBy B1 {\n");
+		buf.append("        abstract String getFoo();\n");
+		buf.append("		getFoo -> get foo;\n"); // removed signatures
+		buf.append("    }\n");
+		buf.append("}\n");
+		expectedProposals[0] = buf.toString();
+
+		assertExpectedExistInProposals(proposals, expectedProposals);
+	}
+
+	/* Add signatures to a callout. */
+	public void testAddSignatures1() throws Exception {
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class B1 {\n");
+		buf.append("    String foo(Object o) { return null; }\n");
+		buf.append("}\n");
+		pack1.createCompilationUnit("B1.java", buf.toString(), false, null);
+
+		buf = new StringBuffer();
+		buf.append("package test1;\n");	
+		buf.append("public team class T1 {\n");
+		buf.append("    protected class R playedBy B1 {\n");
+		buf.append("        abstract String getFoo(Boolean b);\n");
+		buf.append("		getFoo -> foo;\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cuteam = pack1.createCompilationUnit("T1.java", buf.toString(), false, null);
+		
+		int offset= buf.toString().indexOf("getFoo -> foo");
+		AssistContext context= getCorrectionContext(cuteam, offset, 0);
+		List proposals= collectAssists(context, false);
+
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		String[] expectedProposals = new String[1];
+		buf= new StringBuffer();
+		buf.append("package test1;\n");	
+		buf.append("public team class T1 {\n");
+		buf.append("    protected class R playedBy B1 {\n");
+		buf.append("        abstract String getFoo(Boolean b);\n");
+		buf.append("		String getFoo(Boolean b) -> String foo(Object o);\n"); // added signatures
+		buf.append("    }\n");
+		buf.append("}\n");
+		expectedProposals[0] = buf.toString();
+
+		assertExpectedExistInProposals(proposals, expectedProposals);
+	}
+
+	/* Add signatures to a callout to field. */
+	public void testAddSignatures2() throws Exception {
+		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class B1 {\n");
+		buf.append("    String foo;\n");
+		buf.append("}\n");
+		pack1.createCompilationUnit("B1.java", buf.toString(), false, null);
+
+		buf = new StringBuffer();
+		buf.append("package test1;\n");	
+		buf.append("public team class T1 {\n");
+		buf.append("    protected class R playedBy B1 {\n");
+		buf.append("        abstract String getFoo();\n");
+		buf.append("		getFoo -> get foo;\n"); 
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cuteam = pack1.createCompilationUnit("T1.java", buf.toString(), false, null);
+		
+		int offset= buf.toString().indexOf("getFoo -> get");
+		AssistContext context= getCorrectionContext(cuteam, offset, 0);
+		List proposals= collectAssists(context, false);
+
+		assertNumberOfProposals(proposals, 1);
+		assertCorrectLabels(proposals);
+
+		String[] expectedProposals = new String[1];
+		buf= new StringBuffer();
+		buf.append("package test1;\n");	
+		buf.append("public team class T1 {\n");
+		buf.append("    protected class R playedBy B1 {\n");
+		buf.append("        abstract String getFoo();\n");
+		buf.append("		String getFoo() -> get String foo;\n"); // added signatures
+		buf.append("    }\n");
+		buf.append("}\n");
+		expectedProposals[0] = buf.toString();
+
+		assertExpectedExistInProposals(proposals, expectedProposals);
+	}
+
 }