This was the old GRECLIPSE-1786.
Consider the following code. An interface:
package f;
public interface IFJ {
void doSomething(int a, boolean b);
void doSomething(int a);
}
A Java class implementing that interface:
package f;
public class FJ implements IFJ {
@Override
public void doSomething(int a) {
doSomething(a, false);
}
@Override
public void doSomething(int a, boolean b) {
}
}
A Java class using an instance of the aforementioned class, through the interface:
package f;
public class FGJava {
public void foo() {
IFJ fj = new FJ();
fj.doSomething(1);
}
}
The same class, written in Groovy:
package f
class FG {
void foo() {
IFJ fj = new FJ()
fj.doSomething(1)
}
}
Now, select the following methods:
f.IFJ.doSomething(int)
f.FJ.doSomething(int)
Invoke Call Hierarchy (Ctrl+Alt+H) and Search for References (Ctrl+Shift+G). In the first case, both f.FGJava.foo() and f.FG.foo() are shown, in the second case only f.FGJava.foo() is shown.
Now, select f.FJ.doSomething(int, boolean) and invoke Call Hierarchy. Expand f.FJ.doSomething(int). Coherently with the second case above, only f.FGJava.foo() is shown.
In other words, references from Groovy code are not found when the invocation is made through an interface.
This was the old GRECLIPSE-1786.
Consider the following code. An interface:
A Java class implementing that interface:
A Java class using an instance of the aforementioned class, through the interface:
The same class, written in Groovy:
Now, select the following methods:
f.IFJ.doSomething(int)f.FJ.doSomething(int)Invoke Call Hierarchy (Ctrl+Alt+H) and Search for References (Ctrl+Shift+G). In the first case, both
f.FGJava.foo()andf.FG.foo()are shown, in the second case onlyf.FGJava.foo()is shown.Now, select
f.FJ.doSomething(int, boolean)and invoke Call Hierarchy. Expandf.FJ.doSomething(int). Coherently with the second case above, onlyf.FGJava.foo()is shown.In other words, references from Groovy code are not found when the invocation is made through an interface.