History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-16560
Type: Bug Bug
Status: Open Open
Assignee: Unassigned
Reporter: Serge Baranov
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Call Hierarchy displays wrong results

Created: 29 Nov 07 17:53   Updated: 29 Nov 07 17:53
Component/s: Project View

Build: 7,576
Severity: Medium


 Description  « Hide
Support feedback:

Hi!

The Call Hierarchy displays wrong results, when interfaces are involved. Compared to eclipse, IDEA displays additional entries, which are simply
wrong. Here is an example:

public interface I {
    public void setValue(String value);
}

public class A implements I {
    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    protected String value;
}

public class B implements I {
    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    protected String value;
}

public class Test {
    public static void main(String args[]) {
        B b = new B();
        b.setValue("Test");
    }
}

When I now ask the program to display the call hierarchy of A.setValue and B.setValue, it shows me in both cases that it is called by Test.main. But
A.setValue is not called by Test.main! This problem does not occur when using the Call Hierarchy of eclipse.

Reply from Max: We automatically show call hierarchy for interface method, that's why B.setValue() matches. We probably need to ask for confirmation like Find Usages feature does.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.