Bug 165904 - [rename] Method parameters in super and sub-classes
Summary: [rename] Method parameters in super and sub-classes
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-27 07:40 EST by Ahmed Ashour CLA
Modified: 2006-11-30 04:21 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmed Ashour CLA 2006-11-27 07:40:56 EST
In the following case, renaming 'name1' should recursively rename 'name2' as well (or at least ask the user whether to propagate renaming or not).

This can be also considered during "change method signature".

Many thanks.

public class Test {
	public void someMethod( String name1 ) {
	}
}

class TestSub extends Test {
	@Override
	public void someMethod( String name2 ) {
	}
}
Comment 1 Markus Keller CLA 2006-11-29 08:14:45 EST
Change Method Signature already updates the parameter name in all subtypes iff the parameter name in the subtype method matches the name in the supertype method. We have not had any complaints about that heuristic so far, and I think it covers most usage scenarios well.
Comment 2 Ahmed Ashour CLA 2006-11-30 04:21:49 EST
I see the point of no need to rename both if they don't originally match.

But what about renaming both if they already match, just like the behavior of "change method signature"?