summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-08-08 16:18:03 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2012-08-10 14:39:42 +0300
commit2bb642c779cb6dba9856882de92fec772590135f (patch)
tree87846ac710ca324bfe2ce5b851c6ad70a19c41db /src/com/vaadin
parentf235fa7f64e334d945fdb6c83c4f5aaa9003267a (diff)
downloadvaadin-framework-2bb642c779cb6dba9856882de92fec772590135f.tar.gz
vaadin-framework-2bb642c779cb6dba9856882de92fec772590135f.zip
A few improvements to shared state debug console (#8422)
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ApplicationConnection.java22
-rw-r--r--src/com/vaadin/terminal/gwt/client/VUIDLBrowser.java24
2 files changed, 18 insertions, 28 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
index ce8683ce90..d757bf89a2 100644
--- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
+++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
@@ -147,8 +147,6 @@ public class ApplicationConnection {
*/
public static final String UIDL_REFRESH_TOKEN = "Vaadin-Refresh";
- private final boolean debugLogging = true || false;
-
// will hold the UIDL security key (for XSS protection) once received
private String uidlSecurityKey = "init";
@@ -1162,16 +1160,6 @@ public class ApplicationConnection {
updateDuration.logDuration(" * Creating connectors completed",
10);
- if (debugLogging) {
- VConsole.log(" * Dumping state changes to the console");
- VConsole.dirUIDL(json, ApplicationConnection.this);
-
- updateDuration
- .logDuration(
- " * Dumping state changes to the console completed",
- 10);
- }
-
// Update states, do not fire events
Collection<StateChangeEvent> pendingStateChangeEvents = updateConnectorState(json);
@@ -1238,6 +1226,16 @@ public class ApplicationConnection {
updateDuration
.logDuration(" * Layout processing completed", 10);
+ if (ApplicationConfiguration.isDebugMode()) {
+ VConsole.log(" * Dumping state changes to the console");
+ VConsole.dirUIDL(json, ApplicationConnection.this);
+
+ updateDuration
+ .logDuration(
+ " * Dumping state changes to the console completed",
+ 10);
+ }
+
if (meta != null) {
if (meta.containsKey("appError")) {
ValueMap error = meta.getValueMap("appError");
diff --git a/src/com/vaadin/terminal/gwt/client/VUIDLBrowser.java b/src/com/vaadin/terminal/gwt/client/VUIDLBrowser.java
index 5b8ba59c79..f7d43a1a12 100644
--- a/src/com/vaadin/terminal/gwt/client/VUIDLBrowser.java
+++ b/src/com/vaadin/terminal/gwt/client/VUIDLBrowser.java
@@ -56,11 +56,11 @@ public class VUIDLBrowser extends SimpleTree {
for (String key : keySet) {
if (key.equals("state")) {
ValueMap stateJson = u.getValueMap(key);
- SimpleTree stateChanges = new SimpleTree("Shared state");
+ SimpleTree stateChanges = new SimpleTree("shared state");
- for (String stateKey : stateJson.getKeySet()) {
- stateChanges.add(new SharedStateItem(stateKey, stateJson
- .getValueMap(stateKey)));
+ for (String connectorId : stateJson.getKeySet()) {
+ stateChanges.add(new SharedStateItem(connectorId, stateJson
+ .getValueMap(connectorId)));
}
add(stateChanges);
@@ -75,16 +75,9 @@ public class VUIDLBrowser extends SimpleTree {
}
} else if (key.equals("meta")) {
- } else if (key.equals("hierarchy")) {
- ValueMap hierJSON = u.getValueMap(key);
- SimpleTree hierarchy = new SimpleTree("Hierarchy");
- for (String hierKey : hierJSON.getKeySet()) {
- hierarchy.addItem(hierKey + ": "
- + hierJSON.getAsString(hierKey));
- }
- add(hierarchy);
} else {
- // TODO consider pretty printing other request data
+ // TODO consider pretty printing other request data such as
+ // hierarchy changes
// addItem(key + " : " + u.getAsString(key));
}
}
@@ -146,10 +139,9 @@ public class VUIDLBrowser extends SimpleTree {
this.connectorId = connectorId;
ComponentConnector connector = getConnector();
if (connector != null) {
- setText(connectorId + " " + connector.getState().getDebugId()
- + " " + connector.getClass());
+ setText(Util.getConnectorString(connector));
} else {
- setText(connectorId + " unknown");
+ setText("Unknown connector " + connectorId);
}
dir(new JSONObject(stateChanges), this);
}