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.
If a method contains a constant value hard-coded in it, it is very helpful to have a refactoring option to turn this into a parameter and make all invocations use the constant value by default. Before Refactoring: public class Sample { public void invoker1() { show(); } public void invoker2() { show(); } private void show() { System.out.println("Hello"); } } After Refactoring: public class Sample { public void invoker1() { show("Hello"); } public void invoker2() { show("Hello"); } private void show(String value) { System.out.println(value); } }
Integrated into 'main-golden', will be available in build *201105270401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ad501b78a7ad User: Jan Becicka <jbecicka@netbeans.org> Log: Introduce parameter initial prototype - make final does not work correctly - replace all occurrences does not work. Depends on hints/jackpot Issue #176217 - Introduce Parameter Refactoring
Changeset: fea0c60f1cf3 Author: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Date: 2011-08-29 16:00 Message: Issue #176217 - Introduce Parameter Refactoring
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/fea0c60f1cf3 User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: Issue #176217 - Introduce Parameter Refactoring