while (!pendingVariables.isEmpty()) {
if (ApplicationConfiguration.isDebugMode()) {
- logVariableBurst(pendingVariables);
+ Util.logVariableBurst(this, pendingVariables);
}
for (int i = 0; i < pendingVariables.size(); i++) {
if (i > 0) {
makeUidlRequest(req.toString(), "", forceSync);
}
- private void logVariableBurst(ArrayList<String> pendingVariables2) {
- try {
- VConsole.log("Variable burst to be sent to server:");
- String curId = null;
- ArrayList<String[]> vars = new ArrayList<String[]>();
- for (int i = 0; i < pendingVariables.size(); i++) {
- String value = pendingVariables2.get(i++);
- String[] split = pendingVariables2.get(i).split(
- VAR_FIELD_SEPARATOR);
- String id = split[0];
-
- if (curId == null) {
- curId = id;
- } else if (!curId.equals(id)) {
- printPaintablesVariables(vars, curId);
- vars.clear();
- curId = id;
- }
- split[0] = value;
- vars.add(split);
- }
- if (!vars.isEmpty()) {
- printPaintablesVariables(vars, curId);
- }
- } catch (Exception e) {
- VConsole.error(e);
- }
- }
-
- private void printPaintablesVariables(ArrayList<String[]> vars, String id) {
- Paintable paintable = getPaintable(id);
- if (paintable != null) {
- VConsole.log("\t" + id + " (" + paintable.getClass() + ") :");
- for (String[] var : vars) {
- VConsole.log("\t\t" + var[1] + " (" + var[2] + ")" + " : "
- + var[0]);
- }
- }
- }
-
private void makeUidlRequest(String string) {
makeUidlRequest(string, "", false);
}
package com.vaadin.terminal.gwt.client;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
return idx;
}
+ private static void printPaintablesVariables(ArrayList<String[]> vars,
+ String id, ApplicationConnection c) {
+ Paintable paintable = c.getPaintable(id);
+ if (paintable != null) {
+ VConsole.log("\t" + id + " (" + paintable.getClass() + ") :");
+ for (String[] var : vars) {
+ VConsole.log("\t\t" + var[1] + " (" + var[2] + ")" + " : "
+ + var[0]);
+ }
+ }
+ }
+
+ static void logVariableBurst(ApplicationConnection c,
+ ArrayList<String> loggedBurst) {
+ try {
+ VConsole.log("Variable burst to be sent to server:");
+ String curId = null;
+ ArrayList<String[]> vars = new ArrayList<String[]>();
+ for (int i = 0; i < loggedBurst.size(); i++) {
+ String value = loggedBurst.get(i++);
+ String[] split = loggedBurst.get(i).split(
+ ApplicationConnection.VAR_FIELD_SEPARATOR);
+ String id = split[0];
+
+ if (curId == null) {
+ curId = id;
+ } else if (!curId.equals(id)) {
+ printPaintablesVariables(vars, curId, c);
+ vars.clear();
+ curId = id;
+ }
+ split[0] = value;
+ vars.add(split);
+ }
+ if (!vars.isEmpty()) {
+ printPaintablesVariables(vars, curId, c);
+ }
+ } catch (Exception e) {
+ VConsole.error(e);
+ }
+ }
+
}