Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 118404

Summary: [rename] Update similar names missed opportunity
Product: [Eclipse Project] JDT Reporter: Dirk Baeumer <dirk_baeumer>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r, mlists
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Dirk Baeumer CLA 2005-11-29 06:21:19 EST
I20051123-1200

- smoke test
- rename Test to Toast
- enable update derived names. Configure embedded match

>> expected: Test#countTestCases is renamed to countToastCases
<< actual: countTestCases stays 

The problem is that the method doesn't have any references to Test. So may be we should treat the methods inside of the type we are renaming special and should do a method name match here as well.
Comment 1 Markus Keller CLA 2005-11-29 07:29:29 EST
I agree with this case, but I'm not sure whether looking at methods in the renamed type alone is enough then for two reasons:

a) overridden methods in subtypes of Test must still be handled properly -> check whether we rely on the assumption that all methods are found anyway

b) methods from subtypes of Test are as well candidates as the methods from Test, e.g. TestSuite#testCount(), #tests(), #addTestSuite(Class).
=> additional problem: should addTestSuite(Class) be renamed to addToastSuite(Class), although TestSuite is not renamed
Comment 2 Markus Keller CLA 2005-12-01 14:04:53 EST
Another example:
Assume you want to rename type java.util.List to Sequence. Would you expect that
'ListIterator listIterator()' is renamed to 'ListIterator sequenceIterator()'?
I wouldn't.

I think we need more compelling use cases to judge whether clients would really expect such renamings.
Comment 3 Eclipse Genie CLA 2019-05-01 14:25:29 EDT
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.