Community
Participate
Working Groups
I20031119 (M5 test pass) 1. have this code: public class Test { public void foobar() { class Listener3 { public Object fTest2; public void method() { fTest2= null; } } Listener3 list= new Listener3() { public int bar() { return 1; } }; list.fTest2= this; } } 2. select fTest2 3. Choose Refactor->Encapsulate Field 4. Ensure that "Field access in declaring class" is set to "use setter and getter" (should be selected per default) 5. Proceed to preview -> Note that everything looks good, except: -> the reference inside the top-level type's method does not get replaced by a setter call -> the reference inside the local type does not get replaced by a setter call
Very likely a search engine bug.
Moving to JDT/Core. Searching for references to fTest2 in this scenario reports zero matches.
Dirk: Can you double check this in the latest build. It worked for me.
I believe this is fixed in our latest changes that are in M5.
Marking as fixed in M5.
Works in the latest
Verified.