Bug 101419 - [extract method] use code style for paramter names
Summary: [extract method] use code style for paramter names
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 391968 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-23 05:59 EDT by Emanuel Kupcik CLA
Modified: 2023-12-22 13:40 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuel Kupcik CLA 2005-06-23 05:59:33 EDT
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.
Comment 1 Eclipse Genie CLA 2019-12-19 14:17:27 EST
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.
Comment 2 Dani Megert CLA 2019-12-20 03:08:07 EST
Seems to work using 4.14. Please reopen with detailed steps if you still see this.
Comment 3 Peter Lutz CLA 2019-12-27 22:49:37 EST
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.
Comment 4 Dani Megert CLA 2019-12-28 11:55:44 EST
*** Bug 391968 has been marked as a duplicate of this bug. ***
Comment 5 Dani Megert CLA 2019-12-28 11:57:05 EST
.
Comment 6 Eclipse Genie CLA 2021-12-18 06:03:07 EST
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.
Comment 7 Eclipse Genie CLA 2023-12-09 01:03:30 EST
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.
Comment 8 Peter Lutz CLA 2023-12-22 13:40:21 EST
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.