Bug 240790

Summary: [search] callers are not found when caller and callee reside in sibling Java projects
Product: [Eclipse Project] JDT Reporter: Thomas Bensler <bensler>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: david_audel, Olivier_Thomann
Version: 3.4   
Target Milestone: 3.5 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Thomas Bensler CLA 2008-07-15 05:40:14 EDT
Build ID:  I20080617-2000

Steps To Reproduce:
1. create a java project "common" having one interface

package test.common;
public interface I {
    public void doIt();
}

2. create a java project "client" depending on "common" having one class

package test.client;
import test.common.I;
public class Client {
    public Client() {
        ((I)null).doIt();
    }
}

3. create a java project "server" depending on "common" having one class

package test.server;
import test.common.I;
public class Impl implements I {
    public void doIt() {}
}

4. position cursor on doIt() in class Impl, right click for context menu, choose "open call hierarchy"

5. ensure that the call hierarchy view is in "Show Caller hierarchy" mode. 

6. Client.<init()> is not found being a caller (search cope might be "Workspace" or "Hierarchy")

You might raise the objection that this behavior is fine because the classes Impl and Client are not visible to each other as they reside in sibling projects.

counter-argument:
opening the class hierarchy of interface I when being in class Client shows the Impl class. Each known implementation of an interface method should be presumed as possible target of calling that interface method
Comment 1 Jerome Lanneluc CLA 2008-08-14 06:32:40 EDT
This is a search issue. I'm pretty sure we discussed this before. I could not find the relevant bug.
Comment 2 Frederic Fusier CLA 2009-03-04 10:12:18 EST

*** This bug has been marked as a duplicate of bug 250454 ***
Comment 3 David Audel CLA 2009-03-09 12:15:25 EDT
Verified for 3.5M6 using I20090309-0100.