Bug 33800 - search: reporting too many method occurrences
Summary: search: reporting too many method occurrences
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.1 RC2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-04 14:45 EST by Adam Kiezun CLA
Modified: 2003-03-10 11:17 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2003-03-04 14:45:48 EST
20030227
1. create 2 projects (unrelated)
2. in each create:
- package p
- interface I in p
- class C in p

make both I's look like this:
package p;
public interface I {
    void method(Object o);
}

and C's like this:
package p;
public class C implements I {
    public void method(Object o) {
    }
}

now, select one of the I.method's and search for occurences in workspace
you get 4 results, not 2 as expected

(same happened when i did the search programmatically)
Comment 1 Jerome Lanneluc CLA 2003-03-05 06:10:16 EST
When creating a search pattern from an IJavaElement, focus was set only for 
REFERENCES patterns. Now set it for DECLARATIONS and ALL_OCCURENCES patterns as 
well.

Added regression test JavaSearchMultipleProjectsTests.testMethodOccurences()
Comment 2 David Audel CLA 2003-03-10 11:17:45 EST
Verified.