isHTML = true;
}
}
// Get the options:
IGlobalOptions options = ServiceLocator.getInstance(IGlobalOptions.class);
// Set syntax color:
if(options.isPropertyTrue("response.body.syntax.color")) {
if(isXml) {
se_response.setSyntax(TextEditorSyntax.XML);
}
if(isJson) {
se_response.setSyntax(TextEditorSyntax.JSON);
}
if(isHTML) {
se_response.setSyntax(TextEditorSyntax.HTML);
}
}
else { // No syntax!
se_response.setSyntax(TextEditorSyntax.NONE);
}
// Find if you need to indent
final String responseBody = new String(getBody(), HttpUtil.getCharsetDefault(type));
if(options.isPropertyTrue("response.body.indent")) {
if(isXml){
try{
String indentedResponseBody = XMLIndentUtil.getIndented(responseBody);
se_response.setText(indentedResponseBody);
}