I'm working on a GWT application and would like to branch some logic based on whether the code is running in development mode or is live in production.
For example, when the code needs to make an AJAX call we would like to set the URL depending on mode.
Starting with GWT 2.7, Dev Mode launches Super Dev Mode automatically. Just start Dev Mode and reload the page, and it will recompile automatically when necessary.
development mode. Refers to running your application under a special GWT supplied browser. Development mode runs your application directly in Java so that you can use a Java IDE debugger to help test and debug your application. Google Plugin for Eclipse.
Using this Development Mode will start a code server that listens for requests from the browser to compile the application. When the CodeServer launches and moves the resources to the module directory. Then it adds a war/module/module. nocache.
GWT >= 2.1.0
boolean isDevelopmentMode() {
return !GWT.isProdMode() && GWT.isClient();
}
GWT < 2.1.0
boolean isDevelopmentMode() {
return !GWT.isScript() && GWT.isClient();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With