This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build ID: 200609161800 (Netbeans 6.0 M3) Steps to reproduce: apply Push Down Field refactoring on the following program: public class A { public int f; public void method_A(){ class B extends A { public void method_B(){ int aVal = 0; super.f = 0; } } } } The precondition phase reports back the message "Cannot push down any members. The selected type has no subtypes in the currently opened projects". This refactoring should be allowed to proceed because: (a) the selected type does have a subtype (class B) (b) the only reference to the field is coming from the subclass B (even though this is then referenced from a method in class A)
Is cursor located within class A when calling refactoring?
The field A.f is selected in order to apply the push down field refactoring
This works for me in M10, the problem is "super.f=0" reference, but it is filed as another issue.