Bug 454331 - Rename fields should also rename parameters with the same name.
Summary: Rename fields should also rename parameters with the same name.
Status: CLOSED DUPLICATE of bug 64698
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4.1   Edit
Hardware: PC Linux
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-06 15:33 EST by Andrea Del Bene CLA
Modified: 2014-12-08 09:12 EST (History)
3 users (show)

See Also:


Attachments
Rename field dialog (75.44 KB, image/png)
2014-12-08 07:04 EST, Andrea Del Bene CLA
no flags Details
Rename field preview (125.01 KB, image/png)
2014-12-08 07:05 EST, Andrea Del Bene CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Del Bene CLA 2014-12-06 15:33:34 EST
A quite nice feature I've found working with IntelliJ is the "rename" feature for class fields which can be set to rename also every method parameters with the same old name of the renamed field.
This is quite useful when you decide to rename a final field which has a getter and has one or more constructor parameters with the same name.
I haven't found this feature in Luna and, even if I'm not familiar yet with Eclipse codebase, I think it shouldn't be big deal to implement it in the Rename Dialog.

Thank you.
Comment 1 Manoj N Palat CLA 2014-12-07 22:00:42 EST
Andrea: Could you please post a code snippet showing "before rename" and "after rename" scenarios? Though your description is more or less clear, this is to make sure that we all are on the same page.

[Noopur: Moving to jdt.ui for comments]
Comment 2 Andrea Del Bene CLA 2014-12-08 07:04:18 EST
Created attachment 249233 [details]
Rename field dialog
Comment 3 Andrea Del Bene CLA 2014-12-08 07:05:29 EST
Created attachment 249234 [details]
Rename field preview
Comment 4 Andrea Del Bene CLA 2014-12-08 08:09:32 EST
Hi Manoj,

I've added two simple screenshot to show what I mean with a very basic class. As you can see I've opened the "Rename field" window to rename 'foo' field to 'foo2' (Selection_063.png), then in the preview step (Selection_064.png) everything is correctly renamed, included the getter method, BUT not method parameters with the same name (the contructor parameter 'foo' is not renamed).
Comment 5 Markus Keller CLA 2014-12-08 09:12:31 EST

*** This bug has been marked as a duplicate of bug 64698 ***