Bug 34789 - Search for references does not show subclassed methods
Summary: Search for references does not show subclassed methods
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-12 03:45 EST by Oyvind Harboe CLA
Modified: 2003-03-17 11:09 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 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