Bug 25144 Autofix for unimplemented methods does not use argument names from declaration [quick fix]
build 20021018 - in self hosting workspace, - ensure SWT has source - create a new subclass of org.eclipse.swt.widgets.Layout called TestLayout - notice that the two methods (computeSize and layout) have argument names from the declaration, like: protected void layout(Composite composite, boolean flushCache) - delete method layout - a yellow light appears on the class decl for TestLayout - click on it and choose Add unimplemented methods - it shows up as: protected void layout(Composite arg0, boolean arg1)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnimplementedMethodsCompletionProposal.java
MethodDeclaration newMethodDecl= createNewMethodDeclaration(ast, methods[i], rewrite, settings);
			rewrite.markAsInserted(newMethodDecl);
			bodyDecls.add(newMethodDecl);
		}
		return rewrite;
	}
	
	private MethodDeclaration createNewMethodDeclaration(AST ast, IMethodBinding binding, ASTRewrite rewrite, CodeGenerationSettings commentSettings) throws CoreException {
		MethodDeclaration decl= ast.newMethodDeclaration();
		decl.setModifiers(binding.getModifiers() & ~Modifier.ABSTRACT);
		decl.setName(ast.newSimpleName(binding.getName()));
		
		ITypeBinding returnTypeBinding= binding.getReturnType();
		addImport(returnTypeBinding);
		
		decl.setReturnType(ASTResolving.getTypeFromTypeBinding(ast, returnTypeBinding));
		
		List parameters= decl.parameters();
		ITypeBinding[] params= binding.getParameterTypes();
		for (int i= 0; i < params.length; i++) {
			ITypeBinding curr= params[i];
			addImport(curr);		
			SingleVariableDeclaration var= ast.newSingleVariableDeclaration();
			var.setType(ASTResolving.getTypeFromTypeBinding(ast, curr));
			var.setName(ast.newSimpleName("arg" + i));
			parameters.add(var);
		}		
		
		List thrownExceptions= decl.thrownExceptions();
		ITypeBinding[] excTypes= binding.getExceptionTypes();