append(" - " + object.getConnectionHandler().getPresentableText(), SimpleTextAttributes.GRAY_ATTRIBUTES);
}
}
else if (value instanceof CompilerMessageNode) {
CompilerMessageNode node = (CompilerMessageNode) value;
CompilerMessage message = node.getCompilerMessage();
append(message.getText(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
MessageType messageType = message.getType();
Icon icon =
messageType == MessageType.ERROR ? Icons.EXEC_MESSAGES_ERROR :
messageType == MessageType.WARNING ? Icons.EXEC_MESSAGES_WARNING :
messageType == MessageType.INFO ? Icons.EXEC_MESSAGES_INFO : null;
setIcon(icon);
}
else if (value instanceof StatementExecutionMessageNode) {
StatementExecutionMessageNode execMessageNode = (StatementExecutionMessageNode) value;
StatementExecutionMessage message = execMessageNode.getExecutionMessage();
boolean isOrphan = message.isOrphan();
MessageType messageType = message.getType();
Icon icon =
messageType == MessageType.ERROR ? (isOrphan ? Icons.EXEC_MESSAGES_WARNING : Icons.EXEC_MESSAGES_ERROR) :
messageType == MessageType.WARNING ? Icons.EXEC_MESSAGES_WARNING :
messageType == MessageType.INFO ? Icons.EXEC_MESSAGES_INFO : null;
setIcon(icon);
append(message.getText(), isOrphan ?
SimpleTextAttributes.GRAY_ATTRIBUTES :
SimpleTextAttributes.REGULAR_ATTRIBUTES);
if (message.getCauseMessage() != null) {
append(" " + message.getCauseMessage(), isOrphan ?
SimpleTextAttributes.GRAY_ATTRIBUTES :
SimpleTextAttributes.ERROR_ATTRIBUTES);
}
append(" - Connection: " + message.getExecutionResult().getConnectionHandler().getName() + ": " + message.getExecutionResult().getExecutionDuration() + "ms", isOrphan ?
SimpleTextAttributes.GRAY_ATTRIBUTES :
SimpleTextAttributes.GRAY_ATTRIBUTES);
}
}