Bug 34789

Summary: Search for references does not show subclassed methods
Product: [Eclipse Project] JDT Reporter: Oyvind Harboe <oyvind.harboe>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: akiezun
Version: 2.1   
Target Milestone: 2.1 RC3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Oyvind Harboe CLA 2003-03-12 03:45:27 EST
Consider:

public class Bar
{
	protected void dosomething()
	{
	}
}

public class Foo extends Bar
{
	protected void dosomething()
	{
	}
}



- Select Bar->dosomething
- Search for references
- None found, I expected Foo->dosomething() to be considered as a reference. 

This is a problem when I use search for reference to figure out if I can delete 
code, example:

class Foo
{
    public void dosomething()
    {
        dosomething2();
    }

    /** this method is empty, but can I delete it? */
    protected void dosomething2()
    {
    }

}

Eclipse is already aware of this particular problem, try Refactor->Change 
method signature and change Bar->dosomething() to private and then preview. 
Eclipse warns that the behaviour of the program might change.
Comment 1 Adam Kiezun CLA 2003-03-12 08:50:09 EST
references to methods are method calls
which i see none in the code provided

if you search for declarations, you should see them

moving to jcore, who provide the functionality
the current bahavior looks fine to me
Comment 2 Oyvind Harboe CLA 2003-03-12 08:55:01 EST
>references to methods are method calls
>which i see none in the code provided
>
>if you search for declarations, you should see them
>
>moving to jcore, who provide the functionality
>the current bahavior looks fine to me

Ah. I see.

I normally use F3 to open a declaration and it didn't(but should) have occurred 
to me to use the feature you described.

I don't have any suggestions as to how the search for declarations might be 
better marketed.

Øyvind




Øyvind