Why don't you simply put such Constants.java file in the shared or client package? It seems to be much simpler solution than yours, isn't it?
br, Mariusz On Aug 16, 4:15 pm, Lothar Kimmeringer <[email protected]> wrote: > Hi, > > is it possible to extend the GWT-compiler, that you can use constants > being defined in classes that aren't client-classes to be used. > > In my client classes I often want to use functionalities on the server > that are configured using magic number (int type, etc.) where a lot > of constants already exist increasing readability and avoid typos. > > At the moment I need to use the numbers instead of the constants > because I end up with the famous "No source code is available > for type ...". Maybe the compiler can check if only final static > primitives are accessed (for a start) and just copy the values of > these fields to the client-source while compiling and just forget > about the fact that a class outside the client-package was used. > > Best regards > > Lothar Kimmeringer -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
