Package com.dci.intellij.dbn.generator

Examples of com.dci.intellij.dbn.generator.StatementGeneratorResult


    }

    @Override
    protected StatementGeneratorResult generateStatement(Project project) {
        StatementGeneratorResult result = new StatementGeneratorResult();
        try {
            String statement = object.extractDDL();
            if (StringUtil.isEmptyOrSpaces(statement)) {
                String message =
                        "Could not extract DDL statement for " + object.getQualifiedNameWithType() + ".\n" +
                        "You may not have enough rights to perform this action. Please contact your database administrator for more details.";
                result.getMessages().addErrorMessage(message);
            }

            result.setStatement(statement);
        } catch (SQLException e) {
            result.getMessages().addErrorMessage(
                    "Could not extract DDL statement for " + object.getQualifiedNameWithType() + ".\n" +
                    "Cause: " + e.getMessage());
        }
       return result;
    }
View Full Code Here


        if (project != null) {
            new BackgroundTask(project, "Extracting select statement", false, true) {
                protected void execute(@NotNull ProgressIndicator progressIndicator) {
                    initProgressIndicator(progressIndicator, true);
                    StatementGeneratorResult result = generateStatement(project);
                    if (result.getMessages().hasErrors()) {
                        MessageUtil.showErrorDialog(result.getMessages(), "Error generating statement");
                    } else {
                        pasteStatement(result, project);
                    }
                }
            }.start();
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.generator.StatementGeneratorResult

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.