Bug 44204 Promote individual methods to interface.
Methods should be able to be promoted to an implemented interface. IE interface SomeThing { public DoDad getDoDad(); } class MyThing implements Something { private DoDad doDad=new DoDad(); public DoDad getDoDad() { return doDad; } public void setDoDad(DoDad dad) { this.doDad=dad; } ^^^^^^^^ } Ctrl-1 on the ^'d should produce 'Declare in interface 'Something''. if more than on interface, multiple options should be given, much like what import does. This enhancement would save time copying, pasting and trimming. Regards, Andy
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/TypeMismatchSubProcessor.java
}
		MethodDeclaration decl= (MethodDeclaration) selectedNode;
		IMethodBinding binding= decl.resolveBinding();
		if (binding == null) {
			return;
		}
		
		IMethodBinding overridden= Bindings.findMethodDefininition(binding);
		if (overridden == null || overridden.getReturnType() == binding.getReturnType()) {
			return;
		}
		ITypeBinding declaringType= overridden.getDeclaringClass();
		
		ICompilationUnit cu= context.getCompilationUnit();
		proposals.add(new TypeChangeCompletionProposal(cu, binding, astRoot, overridden.getReturnType(), false, 8));
		
		ICompilationUnit targetCu= cu;
		if (declaringType != null && declaringType.isFromSource()) {
			targetCu= ASTResolving.findCompilationUnitForBinding(cu, astRoot, declaringType);
		}
		if (targetCu != null) {
			proposals.add(new TypeChangeCompletionProposal(targetCu, overridden, astRoot, binding.getReturnType(), false, 7));
		}
	}
	
	public static void addIncompatibleThrowsProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) throws JavaModelException {
		CompilationUnit astRoot= context.getASTRoot();
		ASTNode selectedNode= problem.getCoveringNode(astRoot);
		if (!(selectedNode instanceof MethodDeclaration)) {
			return;