Java Mailing List Archive

http://www.gg3721.com/

Home » eclipse-plugin-dev.groovy »

[groovy-eclipse-plugin-dev] is content assist possible with dynamic methods or properties?

Carl Parisi

2013-02-02

Replies: Find Java Web Hosting

Author LoginPost Reply

Is it possible have content assist on dynamic methods that were defined in the same method? 
Given the following code, is it possible to have the "newDynamicMethod" be content-assist-presented on the myObj?

def myCode(){

  com.me.MyClass.metaClass.newDynamicMethod = { 
      String string->
      def rel = delegate.runOldMethod(string);
      
      return rel;
   } 

   com.me.MyClass myObj = getMyObj();

   myObj.newDynamicMethod("hello");

}

©2008 gg3721.com - Jax Systems, LLC, U.S.A.