Project: JDT
Bug 115277 [quick fix] Qualify with 'this' generates incorrect code
Reported: 2005-11-07 04:38:21 | Status: verified fixed

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

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java