Bug 65936 - Refactor Rename incorrectly suggests to rename class not method if we have a static method with same name and signature as non-static
Summary: Refactor Rename incorrectly suggests to rename class not method if we have a ...
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 3.0 RC3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-07 05:44 EDT by Anton Tagunov CLA
Modified: 2004-06-28 10:28 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Tagunov CLA 2004-06-07 05:44:42 EDT
Steps:

1. Create the following (incorrect) java class:

public class A
{
	public static A show( int i )
	{
		return new A();
	}
	
	public void show( int i )
	{
		
	}
}

2. select the static "show( int i )" method

3. Do Refactor -> Rename (or Alt+Shift+R)

Observed:

    "Rename Type" , New Name = "A"

Build: 200405280010

Expected:

    "Rename Method", New Name = "show"
Comment 1 Dirk Baeumer CLA 2004-06-07 13:12:49 EDT
The problem here is that the type A has to method show resulting in the fact 
that the CU can't be properly parsed. We then default back to the type.

Won't fix.
Comment 2 Dirk Baeumer CLA 2004-06-07 13:13:53 EDT
Reopening since analysis wasn't correct.
Comment 3 Dirk Baeumer CLA 2004-06-07 13:16:45 EDT
Doing a code resolve with the cursor positioned at sh<cursor>ow( int i ) 
returns the type A as a result. 

Moving to JDT/Core.
Comment 4 Frederic Fusier CLA 2004-06-21 07:52:49 EDT
Cannot reproduce using RC3 build.
Please set as VERIFIED if you agree or reopen the bug, thx
Comment 5 Anton Tagunov CLA 2004-06-28 10:28:20 EDT
Yes, really works in RC3
Really thanx :-)