]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merge #8143 to 6.8 and add missing methods to the Console interface
authorLeif Åstrand <leif@vaadin.com>
Fri, 16 Dec 2011 12:04:04 +0000 (12:04 +0000)
committerLeif Åstrand <leif@vaadin.com>
Fri, 16 Dec 2011 12:04:04 +0000 (12:04 +0000)
svn changeset:22423/svn branch:6.8

src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml
src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java
src/com/vaadin/terminal/gwt/client/Console.java
src/com/vaadin/terminal/gwt/client/NullConsole.java
src/com/vaadin/terminal/gwt/client/ui/VWindow.java

index 1c9b4595124af74e40cf3e21428c39f9437abb8d..7844ccecf1cfb7e2a50a937ef8a16ff4fd0caa20 100644 (file)
        <replace-with class="com.vaadin.terminal.gwt.client.VSchedulerImpl">
                <when-type-is class="com.google.gwt.core.client.impl.SchedulerImpl" />
        </replace-with>
+       
+       <replace-with class="com.vaadin.terminal.gwt.client.VDebugConsole">
+               <when-type-is class="com.vaadin.terminal.gwt.client.Console" />
+       </replace-with>
 
        <!-- Use our own history impl for IE to workaround #2931. -->
        <replace-with class="com.vaadin.terminal.gwt.client.HistoryImplIEVaadin">
index 2871ab8ba46b34c841c6dc7df19c802d10cdc0ec..fce5b4206c671e57d37f264aa31fd1cd573be7bb 100644 (file)
@@ -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 <code>true</code> if debug logging should be quiet
+     */
+    public native static boolean isQuietDebugMode()
     /*-{
         var uri = $wnd.location;
         var re = /debug=q[^\/]*$/;
index ebf4b07e5dc4eb1c5a719a242dfc50161dfb3038..483ab8e0fdebb592e0c969d28a401c9082ee7c65 100644 (file)
@@ -25,4 +25,8 @@ public interface Console {
             Set<Paintable> zeroHeightComponents,
             Set<Paintable> zeroWidthComponents);
 
+    public abstract void setQuietMode(boolean quietDebugMode);
+
+    public abstract void init();
+
 }
\ No newline at end of file
index 8f907e5aef6e981635adcbb4323760669e673798..12df4b323be602837c03858dba9fa71968356347 100644 (file)
@@ -44,4 +44,10 @@ public class NullConsole implements Console {
         GWT.log(e.getMessage(), e);
     }
 
+    public void setQuietMode(boolean quietDebugMode) {
+    }
+
+    public void init() {
+    }
+
 }
index 867e18707099fddae4b1c6898bb2c12d48d14927..9302be29dfda501990568a9222f0d51dab91cce9 100644 (file)
@@ -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;