Bug 31389 Remove unused private fields - broken with >1 field/line
M5: Declare some variables like this: private int v1, v2; Use v2 in the code. (You might also have to turn on the compiler option to make unused fields a warning not ignored). Press ctrl-1 on the variable declaration line, select "remove". The whole line is removed even though v1 was the only unused variable.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
}
		ICompilationUnit cu= context.getCompilationUnit();
		IMethodBinding[] methods= binding.getSuperclass().getDeclaredMethods();
		for (int i= 0; i < methods.length; i++) {
			IMethodBinding curr= methods[i];
			if (curr.isConstructor() && !Modifier.isPrivate(curr.getModifiers())) {
				proposals.add(new ConstructorFromSuperclassProposal(cu, typeDeclaration, curr, 2));
			}
		}
	}
	public static void addUnusedMemberProposal(ICorrectionContext context, List proposals) throws CoreException {
		ASTNode selectedNode= context.getCoveringNode();
		if (selectedNode == null) {
			return;
		}
		BodyDeclaration declaration= ASTResolving.findParentBodyDeclaration(selectedNode);
		if (declaration != null) {
			ASTRewrite rewrite= new ASTRewrite(declaration.getParent());
			rewrite.markAsRemoved(declaration);
			String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.removeunusedmember.description"); 
			Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
			ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 6, image);
			proposal.ensureNoModifications();
			proposals.add(proposal);			
		}
		
	}
	
}