Package com.dci.intellij.dbn.database

Examples of com.dci.intellij.dbn.database.DatabaseMessageParserInterface


        new SimpleLaterInvocator() {
            public void execute() {
                DBDataset dataset = getDataset();
                if (!isDisposed() && dataset != null) {
                    focusEditor();
                    DatabaseMessageParserInterface messageParserInterface = getConnectionHandler().getInterfaceProvider().getMessageParserInterface();
                    DatasetFilterManager filterManager = DatasetFilterManager.getInstance(getProject());

                    DatasetFilter filter = filterManager.getActiveFilter(dataset);
                    String datasetName = dataset.getQualifiedNameWithType();
                    if (getConnectionHandler().isValid()) {
                        if (filter == null || filter == DatasetFilterManager.EMPTY_FILTER || filter.getError() != null) {
                            if (instr.isDeliberateAction()) {
                                String message =
                                        "Error loading data for " + datasetName + ".\n" + (
                                                messageParserInterface.isTimeoutException(e) ?
                                                        "The operation was timed out. Please check your timeout configuration in Data Editor settings." :
                                                        "Database error message: " + e.getMessage());

                                MessageUtil.showErrorDialog(message);
                            }
                        } else {
                            String message =
                                    "Error loading data for " + datasetName + ".\n" + (
                                            messageParserInterface.isTimeoutException(e) ?
                                                    "The operation was timed out. Please check your timeout configuration in Data Editor settings." :
                                                    "Filter \"" + filter.getName() + "\" may be invalid.\n" +
                                                            "Database error message: " + e.getMessage());
                            String[] options = {"Edit filter", "Remove filter", "Ignore filter", "Cancel"};
View Full Code Here


    private Set<ChangeListener> changeListeners = new HashSet<ChangeListener>();

    public DatasetEditorError(ConnectionHandler connectionHandler, Exception exception) {
        this.message = exception.getMessage();
        if (exception instanceof SQLException) {
            DatabaseMessageParserInterface messageParserInterface = connectionHandler.getInterfaceProvider().getMessageParserInterface();
            DatabaseObjectIdentifier objectIdentifier = messageParserInterface.identifyObject(exception.getMessage());
            if (objectIdentifier != null) {
                messageObject = connectionHandler.getObjectBundle().getObject(objectIdentifier);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.database.DatabaseMessageParserInterface

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.