Package com.dci.intellij.dbn.execution.statement.processor

Examples of com.dci.intellij.dbn.execution.statement.processor.StatementExecutionCursorProcessor


    private StatementExecutionProcessor getExecutionProcessorAtCursor(Editor editor) {
        DBLanguageFile file = (DBLanguageFile) DocumentUtil.getFile(editor);
        String selection = editor.getSelectionModel().getSelectedText();
        if (selection != null) {
            return new StatementExecutionCursorProcessor(file, selection, getNextSequence());
        }

        ExecutablePsiElement executable = PsiUtil.lookupExecutableAtCaret(file);
        if (executable != null) {
            return executable.getExecutionProcessor();
View Full Code Here


    public StatementExecutionBasicProcessor createExecutionProcessor(ExecutablePsiElement executablePsiElement) {
        synchronized(executionProcessors) {
            StatementExecutionBasicProcessor executionProcessor =
                    executablePsiElement.isQuery() ?
                            new StatementExecutionCursorProcessor(executablePsiElement, getNextSequence()) :
                            new StatementExecutionBasicProcessor(executablePsiElement, getNextSequence());
            executionProcessors.add(executionProcessor);
            cleanup();
            return executionProcessor;
        }
View Full Code Here

            boolean continueExecution = executionResult.getExecutionProcessor().promptVariablesDialog();
            if (continueExecution) {
                new BackgroundTask(executionResult.getProject(), "Executing statement", false, true) {
                    protected void execute(@NotNull ProgressIndicator progressIndicator) {
                        initProgressIndicator(progressIndicator, true);
                        StatementExecutionCursorProcessor executionProcessor = executionResult.getExecutionProcessor();
                        executionProcessor.execute(progressIndicator);
                    }
                }.start();
            }
        }
    }
View Full Code Here

    @Override
    public void update(AnActionEvent e) {
        boolean visible = false;
        StatementExecutionCursorResult executionResult = getExecutionResult(e);
        if (executionResult != null) {
            StatementExecutionCursorProcessor executionProcessor = executionResult.getExecutionProcessor();
            if (executionProcessor != null) {
                StatementExecutionVariablesBundle executionVariables = executionProcessor.getExecutionVariables();
                visible = executionVariables != null && executionVariables.getVariables().size() > 0;
            }
        }
        e.getPresentation().setVisible(visible);
        e.getPresentation().setText("Open variables dialog");
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.execution.statement.processor.StatementExecutionCursorProcessor

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.