Package com.dci.intellij.dbn.execution.compiler

Examples of com.dci.intellij.dbn.execution.compiler.CompilerMessage


                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);

        }
    }
View Full Code Here


                executionMessage.navigateToEditor();
            }
        }
        else if (object instanceof CompilerMessageNode) {
            CompilerMessageNode compilerMessageNode = (CompilerMessageNode) object;
            CompilerMessage compilerMessage = compilerMessageNode.getCompilerMessage();
            FileEditorManager editorManager = FileEditorManager.getInstance(compilerMessage.getProject());

            DatabaseEditableObjectFile databaseFile = compilerMessage.getDatabaseFile();
            if (compilerMessage.isError() || editorManager.isFileOpen(databaseFile)) {
                editorManager.openFile(databaseFile, false);
                if (compilerMessage.getContentFile() != null) {
                    BasicTextEditor textEditor = EditorUtil.getFileEditor(databaseFile, compilerMessage.getContentFile());
                    if (textEditor != null) {
                        navigateInEditor(compilerMessage, textEditor, databaseFile);
                    }
                }
            }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.execution.compiler.CompilerMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.