Bug 15407 quick fix: removes too many temps (multi declaration case)
20020502+ package p; class Test{ int i(){ int i= 0, jjj= 1; return i; } } jjj is not used to qf offers to remove it. i say 'fine' but it leaves me in a state with compiler errors: class Test{ int i(){ return i; } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
if (parentNodeType == ASTNode.ASSIGNMENT) {
					Assignment assign= (Assignment) selectedNode.getParent();
					if (selectedNode.equals(assign.getLeftHandSide())) {
						pos= assign.getRightHandSide().getStartPosition();
					}
				} else if (parentNodeType == ASTNode.VARIABLE_DECLARATION_FRAGMENT) {
					VariableDeclarationFragment frag= (VariableDeclarationFragment) selectedNode.getParent();
					if (selectedNode.equals(frag.getName())) {
						pos= frag.getInitializer().getStartPosition();
					}
				}
			}
			
			String cast= '(' + Signature.getSimpleName(castDestType) + ')';
			String formatted= StubUtility.codeFormat(cast + 'x', 0, "");  
			if (formatted.charAt(formatted.length() - 1) == 'x') {
				cast= formatted.substring(0, formatted.length() - 1);
			}
						
			String label= CorrectionMessages.getFormattedString("LocalCorrectionsSubProcessor.addcast.description", args[1]); 
			InsertCorrectionProposal proposal= new InsertCorrectionProposal(label, cu, pos, cast, 1);
			
			CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();
			ImportEdit edit= new ImportEdit(problemPos.getCompilationUnit(), settings);
			edit.addImport(castDestType);
			proposal.getCompilationUnitChange().addTextEdit("import", edit); 
		
			proposals.add(proposal);
		}	
	}