Community
Participate
Working Groups
If you extract a method the names should use the defined prefixes for the names of the parameters of the new method as defined in preferences->java-> code style. So if you have "lo" for local variables and "a" for parameters and you have a local variable "loString" then the paramter for the new method should have the name "aString". This feature should be optional. There should also be a setting that defines what to do with names that don't follow the defined style guide.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Seems to work using 4.14. Please reopen with detailed steps if you still see this.
Seems to be still there in: Eclipse IDE for Enterprise Java Developers. Version: 2019-12 (4.14.0) Build id: 20191212-1212 1. Open a new Java project 2. Go to Settings... > Java > Code Style 3. Add "p" as a prefix for parameters. Apply and Close. 4. Create Java class file. 5. Add a line of code (in a new method) including a local variable and extract that line of code using Refactor > Extract Method... Expected: The proposed name of the parameter used (the local variable) starts with a "p". Actual: there is no prefix for the proposed name of the parameter. Please re-open this bug. Bug #391968 seems to be a duplicate of this bug.
*** Bug 391968 has been marked as a duplicate of this bug. ***
.
Seems to be still there in: Eclipse IDE for Java Developers (includes Incubating components) Version: 2023-12 (4.30.0) Build id: 20231201-2043 1. Open a new Java project 2. Go to Settings... > Java > Code Style 3. Add "p" as a prefix for parameters. Apply and Close. 4. Create Java class file. 5. Add a line of code (in a new method) including a local variable and extract that line of code using Refactor > Extract Method... Expected: The proposed name of the parameter used (the local variable) starts with a "p". Actual: there is no prefix for the proposed name of the parameter. A restart of Eclipse does not help either.