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
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.NamingConventions;
import org.eclipse.jdt.core.dom.*;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
import org.eclipse.jdt.internal.corext.dom.ASTRewrite;
import org.eclipse.jdt.internal.corext.dom.Bindings;
import org.eclipse.jdt.internal.corext.dom.ScopeAnalyzer;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
/**
 * Proposals for 'Assign to variable' quick assist
 * - Assign an expression from an ExpressionStatement to a local or field
 * - Assign a parameter to a field
 * */
public class AssignToVariableAssistProposal extends LinkedCorrectionProposal {
	public static final int LOCAL= 1;
	public static final int FIELD= 2;
	
	private final String KEY_NAME= "name";  
	private final String KEY_TYPE= "type";  
	private final int  fVariableKind;
	private final ASTNode fNodeToAssign; 
	private final ITypeBinding fTypeBinding;
		
	public AssignToVariableAssistProposal(ICompilationUnit cu, int variableKind, ExpressionStatement node, ITypeBinding typeBinding, int relevance) {
		super(null, cu, null, relevance, null);
	
		fVariableKind= variableKind;