Bug 42328 assign parameter to new field should declare field final [quick assist]
When using the quick assist to assign to a new field from a constructor parameter it would be nice if the field created was final. The fields can be safely declared final around 99% of the time.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AssignToVariableAssistProposal.java
ASTRewrite rewrite= new ASTRewrite(ast);
		String varName= suggestLocalVariableNames(fTypeBinding);
				
		VariableDeclarationFragment newDeclFrag= ast.newVariableDeclarationFragment();
		newDeclFrag.setName(ast.newSimpleName(varName));
		newDeclFrag.setInitializer((Expression) rewrite.createCopyTarget(expression));
		
		
		VariableDeclarationExpression newDecl= ast.newVariableDeclarationExpression(newDeclFrag);
		
		Type type= evaluateType(ast);
		newDecl.setType(type);
		
		rewrite.replace(expression, newDecl, null); 
		
		addLinkedPosition(rewrite.track(newDeclFrag.getName()), true, KEY_NAME);
		addLinkedPosition(rewrite.track(newDecl.getType()), false, KEY_TYPE);
		setEndPosition(rewrite.track(newDecl));
		return rewrite;
	}
	private ASTRewrite doAddField() throws CoreException {
		boolean isParamToField= fNodeToAssign.getNodeType() == ASTNode.SINGLE_VARIABLE_DECLARATION;
			
		ASTNode newTypeDecl= ASTResolving.findParentType(fNodeToAssign);
		if (newTypeDecl == null) {
			return null;
		}
		
		Expression expression= isParamToField ? ((SingleVariableDeclaration) fNodeToAssign).getName() : ((ExpressionStatement) fNodeToAssign).getExpression();