Thursday, December 4, 2014

Re: MessagesWithLookup

I wanted to try and create such a thing myself, however most code of the com.google.gwt.i18n.rebind is package private.
 
So, any plans to add it (or allow a patch for that feature) ?

Can't you just generate a wrapper class and use delegation? That way you don't have to deal with i18n.rebind package. E.g.

@Messages(MyMessages.class) // used by your generator to create the delegate and inspect all methods
interface MyMessagesWithLookup extends MessagesWithLookup {
}

MyMessagesWithLookupImpl implements MessagesWithLookup {

  MyMessages delegate = GWT.create(MyMessages.class);

  String getByName(String name) {
    switch(name) {
       case "methodName1": return delegate.methodName1();
       .....
    }
  }

}


-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment