David Chandler's Journal of Java Web and Mobile Development

  • David M. Chandler

    Web app developer since 1994 and Google Cloud Platform Instructor now residing in Colorado. Besides tech, I enjoy landscape photography and share my work at ColoradoPhoto.gallery.

  • Subscribe

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 224 other followers
  • Sleepless Nights…

    December 2010
    S M T W T F S
  • Blog Stats

    • 1,035,335 hits

How to find all available settings in .gwt.xml

Posted by David Chandler on December 20, 2010

One fairly well-known trick to speed up GWT compilation during development is to compile for one browser only by setting the user.agent property in your .gwt.xml. For example, to compile a permutation for Chrome / Safari only, use:

<define-property name="user.agent" values="safari"/>

Ever wondered where to find more such properties you can experiment with? Available properties are defined in .gwt.xml files in the GWT source. A simple way to find them all is to browse GWT source, then search for “define-property”. For example, you’ll see that UserAgent.xml contains this:

<define-property name="user.agent" values="ie6,ie8,gecko,gecko1_8,safari,opera"/>

Of if you prefer the command line, you can check out GWT source from SVN, then run

find . -name *.gwt.xml | xargs grep define-property

Happy sleuthing…

9 Responses to “How to find all available settings in .gwt.xml”

  1. Dan Billings said

    A humble inquiry: Shouldn’t there be a DTD somewhere so sleuthing wouldn’t be necessary?

  2. Thanks for the tip! Would Firefox 3.6 be using a “gecko” or “gecko1_8” user agent?

    Also, I’ve been following your blog for over a year because of your GAE/GWT/Objectify posts and am excited to hear you’ll be speaking in Arlington, VA in January (http://www.meetup.com/ncagtug/calendar/15789843). I registered for it today and am looking forward to hearing more!

  3. […] property for the browser you will be testing with. David Chandler shared this tip on his blog: turbomanage.wordpress.com.  Using this will limit the number of permutations of the compilation that are […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: