diff options
author | Henri Sara <hesara@vaadin.com> | 2012-06-20 17:38:17 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2012-06-20 17:38:17 +0300 |
commit | d83a57c7facca417e4e92cacaa64ee9b6dbe4597 (patch) | |
tree | 22d127d79edea56a6c20bdd43b6bc24bb008a1da /src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java | |
parent | 93e9eaf7abfad12d200e9f1805630b7b04daf7e2 (diff) | |
parent | 0f8f9d32e0584743c858afeec12e57dedf0a5f71 (diff) | |
download | vaadin-framework-d83a57c7facca417e4e92cacaa64ee9b6dbe4597.tar.gz vaadin-framework-d83a57c7facca417e4e92cacaa64ee9b6dbe4597.zip |
Merge branch 'master' into gwt
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java index 244f310c1a..960b0a8b0e 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java @@ -18,6 +18,7 @@ import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.ScheduledCommand; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Timer; +import com.google.gwt.user.client.Window; import com.vaadin.terminal.gwt.client.ui.UnknownComponentConnector; public class ApplicationConfiguration implements EntryPoint { @@ -346,6 +347,7 @@ public class ApplicationConfiguration implements EntryPoint { */ public static void startApplication(final String applicationId) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { + public void execute() { ApplicationConfiguration appConf = getConfigFromDOM(applicationId); ApplicationConnection a = GWT @@ -568,6 +570,7 @@ public class ApplicationConfiguration implements EntryPoint { * GWT hosted mode. */ GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { + public void onUncaughtException(Throwable e) { /* * Note in case of null console (without ?debug) we eat @@ -602,12 +605,15 @@ public class ApplicationConfiguration implements EntryPoint { * * @return true if client side is currently been debugged */ - public native static boolean isDebugMode() + public static boolean isDebugMode() { + return isDebugAvailable() + && Window.Location.getParameter("debug") != null; + } + + private native static boolean isDebugAvailable() /*-{ if($wnd.vaadin.debug) { - var parameters = $wnd.location.search; - var re = /debug[^\/]*$/; - return re.test(parameters); + return true; } else { return false; } @@ -618,12 +624,11 @@ public class ApplicationConfiguration implements EntryPoint { * * @return <code>true</code> if debug logging should be quiet */ - public native static boolean isQuietDebugMode() - /*-{ - var uri = $wnd.location; - var re = /debug=q[^\/]*$/; - return re.test(uri); - }-*/; + public static boolean isQuietDebugMode() { + String debugParameter = Window.Location.getParameter("debug"); + return isDebugAvailable() && debugParameter != null + && debugParameter.startsWith("q"); + } /** * Checks whether information from the web browser (e.g. uri fragment and |