Bug 115277 [quick fix] Qualify with 'this' generates incorrect code
Version: 3.2.0 Build id: N20051107-0010 Having the code (with unqualfied field access set to warning): public class E1 { public abstract class E1Inner1 { public abstract void foo(); protected int n; } public abstract class E1Inner2 { public abstract void run(); } public void foo() { E1Inner1 inner= new E1Inner1() { public void foo() { E1Inner2 inner2= new E1Inner2() { public void run() { System.out.println(n); } }; } }; } } A quick fix is shown to qualify n with this generating following code: System.out.println(E1Inner1.this.n); resulting in a compiler error: No enclosing instance of the type E1.E1Inner1 is accessible in scope
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java
public static Test allTests() {
		return new ProjectTestSetup(new TestSuite(THIS));
	}
	
	public static Test setUpTest(Test test) {
		return new ProjectTestSetup(test);
	}
	
	public static Test suite() {
		if (true) {
			return allTests();
		}
		return setUpTest(new AdvancedQuickAssistTest("testAssignToLocal1"));
	}
	protected void setUp() throws Exception {
		Hashtable options= TestOptions.getDefaultOptions();
		options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
		options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
		options.put(DefaultCodeFormatterConstants.FORMATTER_NUMBER_OF_EMPTY_LINES_TO_PRESERVE, String.valueOf(99));
		options.put(JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER, JavaCore.ERROR);
		options.put(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION, JavaCore.IGNORE);
		
		JavaCore.setOptions(options);			
		IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
		store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, false);
		
		StubUtility.setCodeTemplate(CodeTemplateContextType.CATCHBLOCK_ID, "", null);
		StubUtility.setCodeTemplate(CodeTemplateContextType.CONSTRUCTORSTUB_ID, "", null);
		StubUtility.setCodeTemplate(CodeTemplateContextType.METHODSTUB_ID, "", null);
		fJProject1= ProjectTestSetup.getProject();