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
rewrite.markAsRemoved(decl.getBody(), null);
			
			String label= CorrectionMessages.getString("ModifierCorrectionSubProcessor.removebody.description"); 
			Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
			ASTRewriteCorrectionProposal proposal2= new ASTRewriteCorrectionProposal(label, cu, rewrite, 5, image);
			proposal2.ensureNoModifications();
			proposals.add(proposal2);
		}
		
	}
	
	
	
	public static ASTRewriteCorrectionProposal getMakeTypeAbstractProposal(ICompilationUnit cu, TypeDeclaration typeDeclaration, int relevance) throws CoreException {
		ASTRewrite rewrite= new ASTRewrite(typeDeclaration.getParent());
				
		int newModifiers= typeDeclaration.getModifiers() | Modifier.ABSTRACT;
		rewrite.set(typeDeclaration, TypeDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
		String label= CorrectionMessages.getFormattedString("ModifierCorrectionSubProcessor.addabstract.description", typeDeclaration.getName().getIdentifier()); 
		Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, cu, rewrite, relevance, image);
		proposal.ensureNoModifications();
		return proposal;
	}
	public static void addMethodRequiresBodyProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) throws CoreException {
		ICompilationUnit cu= context.getCompilationUnit();
		AST ast= context.getASTRoot().getAST();
		
		ASTNode selectedNode= problem.getCoveringNode(context.getASTRoot());
		if (!(selectedNode instanceof MethodDeclaration)) {