From fa5f05b18b94a1b22f79a442ec3032489a4379f2 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Tue, 3 Apr 2012 17:31:13 +0300 Subject: Add helper method to dump the dependency status of a component --- src/com/vaadin/terminal/gwt/client/LayoutManager.java | 6 ++++++ .../vaadin/terminal/gwt/client/ui/layout/LayoutDependencyTree.java | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/com/vaadin/terminal/gwt/client/LayoutManager.java b/src/com/vaadin/terminal/gwt/client/LayoutManager.java index 6e4d28822b..f7c5570072 100644 --- a/src/com/vaadin/terminal/gwt/client/LayoutManager.java +++ b/src/com/vaadin/terminal/gwt/client/LayoutManager.java @@ -264,6 +264,12 @@ public class LayoutManager { + totalDuration.elapsedMillis() + "ms"); } + private void logConnectorStatus(int connectorId) { + currentDependencyTree + .logDependencyStatus((ComponentConnector) ConnectorMap.get( + connection).getConnector(Integer.toString(connectorId))); + } + private int measureConnectors(LayoutDependencyTree layoutDependencyTree, boolean measureAll) { int measureCount = 0; diff --git a/src/com/vaadin/terminal/gwt/client/ui/layout/LayoutDependencyTree.java b/src/com/vaadin/terminal/gwt/client/ui/layout/LayoutDependencyTree.java index acfd9dcf0f..ad3e198cbd 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/layout/LayoutDependencyTree.java +++ b/src/com/vaadin/terminal/gwt/client/ui/layout/LayoutDependencyTree.java @@ -11,6 +11,7 @@ import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ComponentContainerConnector; import com.vaadin.terminal.gwt.client.ComponentState; import com.vaadin.terminal.gwt.client.Util; +import com.vaadin.terminal.gwt.client.VConsole; import com.vaadin.terminal.gwt.client.ui.ManagedLayout; public class LayoutDependencyTree { @@ -440,4 +441,10 @@ public class LayoutDependencyTree { measureTargets.addAll(getMeasureQueue(VERTICAL)); return measureTargets; } + + public void logDependencyStatus(ComponentConnector connector) { + VConsole.log("===="); + VConsole.log(getDependency(connector, HORIZONTAL).toString()); + VConsole.log(getDependency(connector, VERTICAL).toString()); + } } -- cgit v1.2.3