You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Because Java does not have compiler flags like, it is suggested to use
static (boolean) contants with if expressions instead. The Java
compiler is even required to remove any dead code that results from
such constructs.
In our development we have a number of these kind of compiler flags,
where the developer can choose the flags by including one or more
specific jars in the class path. This works very well for normal Java
code. However, for GWT client code, the GWT compiler makes it hard to
use them, as it requires the source code for these constants, as well
as an explicit inherit and gwt.xml definition.
In my opinion, the GWT compiler should not actually require any source
code for these constructs, as it could simply extract the constant's
value from the class file and replace the reference to the constants
with its value.
Is there any simpler way to handle compiler flags in GWT client code?
Jeff Chimene
unread,
Sep 29, 2011, 2:02:11 PM9/29/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
I think the answer to your question is going to depend on why you need compiler flags. For example, some might say use one or more of the following: (1) assert; (2) inheritance; (3) Gin.
Thomas Broyer
unread,
Sep 30, 2011, 3:40:39 AM9/30/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
(4) deferred binding (and choosing the right gwt.xml to pass to the compiler)
FYI, Google Apache Wave does (4); and that's what GWT suggests using (look at all the properties you can set in a gwt.xml: stacktrace emulation, logging level, logging handlers, CssResource obfuscation, ClientBundle resource inlining, etc.)