summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-06-04 22:29:26 +0300
committerVaadin Code Review <review@vaadin.com>2013-06-05 09:19:10 +0000
commitaa99259eac14854e1e9a33fbbd429d0c5ffa9c52 (patch)
treed13f4ce84e739cc21cdb1ee139721ada556966f3 /server/src/com/vaadin/ui
parent132eee59b8914fdbf9c42a9314e3db95f2f51520 (diff)
downloadvaadin-framework-aa99259eac14854e1e9a33fbbd429d0c5ffa9c52.tar.gz
vaadin-framework-aa99259eac14854e1e9a33fbbd429d0c5ffa9c52.zip
Send connector debug (highlight) using RPC (#11536)
Change-Id: I8995e9affd371543457f16568f1245f7467e0804
Diffstat (limited to 'server/src/com/vaadin/ui')
-rw-r--r--server/src/com/vaadin/ui/UI.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java
index d4ac156787..3194786431 100644
--- a/server/src/com/vaadin/ui/UI.java
+++ b/server/src/com/vaadin/ui/UI.java
@@ -23,6 +23,7 @@ import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.concurrent.Future;
+import java.util.logging.Logger;
import com.vaadin.event.Action;
import com.vaadin.event.Action.Handler;
@@ -30,6 +31,7 @@ import com.vaadin.event.ActionManager;
import com.vaadin.event.MouseEvents.ClickEvent;
import com.vaadin.event.MouseEvents.ClickListener;
import com.vaadin.navigator.Navigator;
+import com.vaadin.server.ClientConnector;
import com.vaadin.server.LocaleService;
import com.vaadin.server.Page;
import com.vaadin.server.PaintException;
@@ -40,15 +42,18 @@ import com.vaadin.server.VaadinService;
import com.vaadin.server.VaadinServlet;
import com.vaadin.server.VaadinSession;
import com.vaadin.server.communication.PushConnection;
+import com.vaadin.shared.Connector;
import com.vaadin.shared.EventId;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.communication.PushMode;
+import com.vaadin.shared.ui.ui.DebugWindowServerRpc;
import com.vaadin.shared.ui.ui.ScrollClientRpc;
import com.vaadin.shared.ui.ui.UIClientRpc;
import com.vaadin.shared.ui.ui.UIConstants;
import com.vaadin.shared.ui.ui.UIServerRpc;
import com.vaadin.shared.ui.ui.UIState;
import com.vaadin.ui.Component.Focusable;
+import com.vaadin.util.ConnectorHelper;
import com.vaadin.util.CurrentInstance;
/**
@@ -161,6 +166,14 @@ public abstract class UI extends AbstractSingleComponentContainer implements
*/
}
};
+ private DebugWindowServerRpc debugRpc = new DebugWindowServerRpc() {
+ @Override
+ public void showServerDebugInfo(Connector connector) {
+ String info = ConnectorHelper
+ .getDebugInformation((ClientConnector) connector);
+ getLogger().info(info);
+ }
+ };
/**
* Timestamp keeping track of the last heartbeat of this UI. Updated to the
@@ -193,6 +206,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
*/
public UI(Component content) {
registerRpc(rpc);
+ registerRpc(debugRpc);
setSizeFull();
setContent(content);
}
@@ -1441,4 +1455,7 @@ public abstract class UI extends AbstractSingleComponentContainer implements
return localeService;
}
+ private static Logger getLogger() {
+ return Logger.getLogger(UI.class.getName());
+ }
}