title: Eclipse content assist not working for Java objects within Groovy files
body: <p>I found this question <a href="https://stackoverflow.com/questions/6312596/eclipse-groovy-and-autocompletion">Eclipse Groovy and autocompletion</a> and am experiencing the same issue, however, it is almost three years hence and I am using the current version of the <em>Groovy Eclipse</em> plugin, and there do not appear to be any syntax errors that would be confusing <em>ANTLR</em>.</p>
  
  <p>I also tried using the <em>Groovy/Grails Tool Suite</em>, and got the same results.</p>
  
  <p>I have mocked up a simple test case under which the content assist works for <em>Groovy</em> objects' methods, and for <em>Java</em> objects' static members, but not <em>Java</em> objects' methods.</p>
  
  <p><strong>The Groovy class:</strong></p>
  
  <pre><code>package test_groovy
  
  import test_groovy.FooJava
  
  class FooGroovy
  {
      def fooJava = [2, "baz"] as FooJava
  
      def x = 4
  
      def FooGroovy()
      {
          // empty constructor    
      }
  
      def useFooJava()
      {
          // only displays Groovy methods, not the java ones
          def str = fooJava.getStr()
          println "str: ${str}"
  
          // static members like this *can* be found via content assist
          def str2 = FooJava.FOO_STR
          println "str2: ${str2}"
  
          // This is also not found via content assist
          def str3 = fooJava.dumpToStr()
          println "str3: ${str3}"
      }
  
      def fooBar()
      {
          return x + 3
      }
  
      static void main(def args)
      {
          def fooGroovy = [] as FooGroovy
  
          // Groovy object methods can be found via content assist
          def res = fooGroovy.fooBar()
          println "res: ${res}"
  
          fooGroovy.useFooJava()
      }
  }
  </code></pre>
  
  <p><strong>The Java class:</strong></p>
  
  <pre><code>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);
      }
  
  }
  </code></pre>
  
  <p>I am using <em>Eclipse</em> Kepler Service Release 2, <em>Groovy</em> compiler 2.0.7 and <em>Groovy Eclipse</em> plugin version 2.8.0.xx-20130703-1600-e43-RELEASE.</p>
  
  <p>Under the <strong>Java > Editor > Content Assist > Advanced</strong> preferences menu, I have made sure all the <em>Java</em> options are checked off in addition to <strong>Groovy Content</strong> (Java Non-Type, Java, Java type Proposals).</p>
  
  <p>Since this does seem to work in general for some, I am wondering what I could be missing here that would allow content assist to work for <em>Java</em> object methods. Thanks.</p>