From 83ae145f53fed1bd45250f69918454371f43c73a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Fri, 16 Dec 2011 12:04:04 +0000 Subject: [PATCH] Merge #8143 to 6.8 and add missing methods to the Console interface svn changeset:22423/svn branch:6.8 --- src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml | 4 ++++ .../terminal/gwt/client/ApplicationConfiguration.java | 9 +++++++-- src/com/vaadin/terminal/gwt/client/Console.java | 4 ++++ src/com/vaadin/terminal/gwt/client/NullConsole.java | 6 ++++++ src/com/vaadin/terminal/gwt/client/ui/VWindow.java | 4 ++-- 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml b/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml index 1c9b459512..7844ccecf1 100644 --- a/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml +++ b/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml @@ -17,6 +17,10 @@ + + + + diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java index 2871ab8ba4..fce5b4206c 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java @@ -449,7 +449,7 @@ public class ApplicationConfiguration implements EntryPoint { } // Prepare VConsole for debugging if (isDebugMode()) { - VDebugConsole console = GWT.create(VDebugConsole.class); + Console console = GWT.create(Console.class); console.setQuietMode(isQuietDebugMode()); console.init(); VConsole.setImplementation(console); @@ -506,7 +506,12 @@ public class ApplicationConfiguration implements EntryPoint { } }-*/; - private native static boolean isQuietDebugMode() + /** + * Checks whether debug logging should be quiet + * + * @return true if debug logging should be quiet + */ + public native static boolean isQuietDebugMode() /*-{ var uri = $wnd.location; var re = /debug=q[^\/]*$/; diff --git a/src/com/vaadin/terminal/gwt/client/Console.java b/src/com/vaadin/terminal/gwt/client/Console.java index ebf4b07e5d..483ab8e0fd 100644 --- a/src/com/vaadin/terminal/gwt/client/Console.java +++ b/src/com/vaadin/terminal/gwt/client/Console.java @@ -25,4 +25,8 @@ public interface Console { Set zeroHeightComponents, Set zeroWidthComponents); + public abstract void setQuietMode(boolean quietDebugMode); + + public abstract void init(); + } \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/NullConsole.java b/src/com/vaadin/terminal/gwt/client/NullConsole.java index 8f907e5aef..12df4b323b 100644 --- a/src/com/vaadin/terminal/gwt/client/NullConsole.java +++ b/src/com/vaadin/terminal/gwt/client/NullConsole.java @@ -44,4 +44,10 @@ public class NullConsole implements Console { GWT.log(e.getMessage(), e); } + public void setQuietMode(boolean quietDebugMode) { + } + + public void init() { + } + } diff --git a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java index 867e187070..9302be29df 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VWindow.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VWindow.java @@ -34,6 +34,7 @@ import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; +import com.vaadin.terminal.gwt.client.Console; import com.vaadin.terminal.gwt.client.Container; import com.vaadin.terminal.gwt.client.EventId; import com.vaadin.terminal.gwt.client.Focusable; @@ -41,7 +42,6 @@ import com.vaadin.terminal.gwt.client.Paintable; import com.vaadin.terminal.gwt.client.RenderSpace; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; -import com.vaadin.terminal.gwt.client.VDebugConsole; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.BeforeShortcutActionListener; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner; @@ -1218,7 +1218,7 @@ public class VWindow extends VOverlay implements Container, // debug window Widget w = Util.findWidget(target, null); while (w != null) { - if (w instanceof VDebugConsole) { + if (w instanceof Console) { return true; // allow debug-window clicks } else if (w instanceof Paintable) { return false; -- 2.39.5