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
/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.ui.tests.quickfix;
import java.util.ArrayList;
import java.util.Hashtable;