Bug 51566 Quick Assist failure
Given this simple class: package whatever; public class ShowBroken extends Thread { ShowBroken() { name = getName(); } } Placing the cursor on the variable 'name'. Notice that quick assist only offers 'Local Rename' as an option. Changing the variable to 'foo' will convince quick assist to offer: Create local variable 'foo' Create field 'foo' Create parameter 'foo' Remove assignment Local Rename The variable 'name' is defined as a private member of Thread and should not be visible to class ShowBroken.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java
}
	
	public static void addOverridesFinalProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) throws JavaModelException {
		ICompilationUnit cu= context.getCompilationUnit();
		ASTNode selectedNode= problem.getCoveringNode(context.getASTRoot());
		if (!(selectedNode instanceof MethodDeclaration)) {
			return;
		}
		
		IMethodBinding method= ((MethodDeclaration) selectedNode).resolveBinding();
		ITypeBinding curr= method.getDeclaringClass();
		IMethodBinding overridden= null;
		while (overridden == null && curr.getSuperclass() != null) {
			curr= curr.getSuperclass();
			overridden= Bindings.findMethodInType(curr, method.getName(), method.getParameterTypes());
		}
		if (overridden == null) {
			return;
		}
		
		ICompilationUnit targetCU= ASTResolving.findCompilationUnitForBinding(cu, context.getASTRoot(), curr);
		if (targetCU != null) {
			String methodName= curr.getName() + '.' + overridden.getName();
			
			String label= CorrectionMessages.getFormattedString("ModifierCorrectionSubProcessor.changemethodtononfinal.description", methodName); 
			Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
			proposals.add(new ModifierChangeCompletionProposal(label, targetCU, overridden, selectedNode, 0, Modifier.FINAL, 9, image));
		}
	}