Bug 43248 "Assign statement to local variable" removes preceeding comment [quick assist] [ast rewrite]
Consider the method public void a() { // here is a comment System.getenv("");X } where X denotes the cursor. If the quick fix "Assign statement to local variable" is used the comment disapears...
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AssignToVariableAssistProposal.java
int insertIdx=  findAssignmentInsertIndex(body.statements());
			rewrite.getListRewrite(body, Block.STATEMENTS_PROPERTY).insertAt(statement, insertIdx, null);
			selectionNode= statement;
			
		} else {			
			rewrite.markAsReplaced(expression, assignment, null);
			selectionNode= fNodeToAssign;
		} 
		
		markAsLinked(rewrite, newDeclFrag.getName(), false, KEY_NAME);
		markAsLinked(rewrite, newDecl.getType(), false, KEY_TYPE);
		markAsLinked(rewrite, accessName, true, KEY_NAME);
		markAsSelection(rewrite, selectionNode);
		
		return rewrite;		
	}
	private Type evaluateType(AST ast) throws CoreException {
		ITypeBinding[] proposals= ASTResolving.getRelaxingTypes(ast, fTypeBinding);
		for (int i= 0; i < proposals.length; i++) {
			addLinkedModeProposal(KEY_TYPE, proposals[i]);
		}
		String typeName= getImportRewrite().addImport(fTypeBinding);
		return ASTNodeFactory.newType(ast, typeName);
	}
	
	private String suggestLocalVariableNames(ITypeBinding binding) {
		IJavaProject project= getCompilationUnit().getJavaProject();
		ITypeBinding base= binding.isArray() ? binding.getElementType() : binding;
		IPackageBinding packBinding= base.getPackage();
		String packName= packBinding != null ? packBinding.getName() : "";