String on = getArgument(0);
String argument1 = getArgument(1);
boolean renderHTML = (argument1 != null && argument1.equalsIgnoreCase("html"));
if (on == null || on.equalsIgnoreCase("true")) {
HTMLResolver resolver = parser.getResolver();
String rootModel_fieldName = resolver.getRootModel().getFieldName();
String actModel_fieldName = parser.getModel().getFieldName();
String modelStack = resolver.getModelStackAsString(parser.getModel());
StringVector variableNames = resolver.getVariableStore().getVariableNames();
StringBuffer result = new StringBuffer();
if (renderHTML) {
result.append("<table>");
} else {
result.append("<!--\n");
}
appendLine(renderHTML, result, "Root Model: " + rootModel_fieldName);
appendLine(renderHTML, result, "Act Model: " + actModel_fieldName);
appendLine(renderHTML, result, "Model Stack: " + modelStack);
appendLine(renderHTML, result, HTMLFunction.PARAMETER_BUTTON + "=" + sessionVariable.getButton());
appendLine(renderHTML, result, HTMLFunction.PARAMETER_CHILD + "=" + sessionVariable.getChild());
appendLine(renderHTML, result, HTMLFunction.PARAMETER_DUPLICATE + "=" + sessionVariable.getDuplicate());
appendLine(renderHTML, result, HTMLFunction.PARAMETER_EVENT + "=" + sessionVariable.getEvent());
appendLine(renderHTML, result, HTMLFunction.PARAMETER_INDEX + "=" + sessionVariable.getIndex());
appendLine(renderHTML, result, HTMLFunction.PARAMETER_ISEDITOR + "=" + sessionVariable.isEditor());
appendLine(renderHTML, result, HTMLFunction.PARAMETER_SELECTED + "=" + sessionVariable.getSelectedChildren());
appendLine(renderHTML, result, HTMLFunction.PARAMETER_STATE + "=" + sessionVariable.getState());
appendLine(renderHTML, result, HTMLFunction.PARAMETER_TEMPLATE + "=" + sessionVariable.getTemplate());
for (String s = variableNames.firstItem(); s != null; s = variableNames.nextItem()) {
appendLine(renderHTML, result, "VARIABLE " + s + ": " + resolver.getVariableStore().getValueOf(s));
}
if (renderHTML) {
result.append("</table>");
} else {
result.append("-->");