I found this Eclipse Groovy question and autocomplete , and I am experiencing the same problem, however after almost three years I am using the current version of the Groovy Eclipse plugin and there seems to be no syntax errors that could mislead ANTLR.
I also tried using the Groovy / Grails Tool Suite and got the same results.
I mocked a simple test case in which assistive content support works for Groovy objects methods, as well as for static elements of Java objects, but not for Java objects.
Groovy Class:
package test_groovy
import test_groovy.FooJava
class FooGroovy
{
def fooJava = [2, "baz"] as FooJava
def x = 4
def FooGroovy()
{
}
def useFooJava()
{
def str = fooJava.getStr()
println "str: ${str}"
def str2 = FooJava.FOO_STR
println "str2: ${str2}"
def str3 = fooJava.dumpToStr()
println "str3: ${str3}"
}
def fooBar()
{
return x + 3
}
static void main(def args)
{
def fooGroovy = [] as FooGroovy
def res = fooGroovy.fooBar()
println "res: ${res}"
fooGroovy.useFooJava()
}
}
Java class:
package test_groovy;
public class FooJava
{
private long bar;
private String str;
public static final String FOO_STR = "foo";
public FooJava(long bar, String str)
{
super();
this.bar = bar;
this.str = str;
}
public long getBar()
{
return bar;
}
public void setBar(long bar)
{
this.bar = bar;
}
public String getStr()
{
return str;
}
public void setStr(String str)
{
this.str = str;
}
public String dumpToStr()
{
return new String("Str: " + str + ", bar: " + bar);
}
}
I am using the Eclipse Kepler Service Release 2, the Groovy compiler 2.0.7, and the Groovy plugin Eclipse version 2.8.0.xx-20130703-1600-e43-RELEASE.
Java > p > > , Java Groovy (Java Non-Type, Java, Java).
, , , , , Java. .