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
boolean isAnonymous= newTypeDecl.getNodeType() == ASTNode.ANONYMOUS_CLASS_DECLARATION;
		ChildListPropertyDescriptor property=  isAnonymous ? AnonymousClassDeclaration.BODY_DECLARATIONS_PROPERTY : TypeDeclaration.BODY_DECLARATIONS_PROPERTY;
		List decls= (List) newTypeDecl.getStructuralProperty(property);
		
		AST ast= newTypeDecl.getAST();
		ASTRewrite rewrite= new ASTRewrite(ast);
		
		BodyDeclaration bodyDecl= ASTResolving.findParentBodyDeclaration(fNodeToAssign);
		Block body;
		if (bodyDecl instanceof MethodDeclaration) {
			body= ((MethodDeclaration) bodyDecl).getBody();
		} else if (bodyDecl instanceof Initializer) {
			body= ((Initializer) bodyDecl).getBody();
		} else {
			return null;
		}
		
		boolean isStatic= Modifier.isStatic(bodyDecl.getModifiers()) && !isAnonymous;
		int modifiers= Modifier.PRIVATE;
		if (isStatic) {
			modifiers |= Modifier.STATIC;
		}
		
		String varName= suggestFieldNames(fTypeBinding, expression, modifiers);
		VariableDeclarationFragment newDeclFrag= ast.newVariableDeclarationFragment();
		newDeclFrag.setName(ast.newSimpleName(varName));
				
		FieldDeclaration newDecl= ast.newFieldDeclaration(newDeclFrag);
		
		Type type= evaluateType(ast);