Package com.dci.intellij.dbn.language.common.psi

Examples of com.dci.intellij.dbn.language.common.psi.ExecutablePsiElement


        return Icons.DBO_TABLE;
    }

    public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile psiFile) {
        if (psiFile instanceof DBLanguageFile) {
            ExecutablePsiElement executable = PsiUtil.lookupExecutableAtCaret(psiFile);
            return  executable != null && executable.getExecutionProcessor() != null &&
                    executable.getExecutionProcessor().getExecutionResult() != null;

            }
         return false;
    }
View Full Code Here


            }
         return false;
    }

    public void invoke(@NotNull Project project, Editor editor, PsiFile psiFile) throws IncorrectOperationException {
        ExecutablePsiElement executable = PsiUtil.lookupExecutableAtCaret(psiFile);
        executable.getExecutionProcessor().navigateToResult();
    }
View Full Code Here

        return Icons.STMT_EXECUTION_RUN;
    }

    public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile psiFile) {
        if (psiFile instanceof DBLanguageFile) {
            ExecutablePsiElement executable = PsiUtil.lookupExecutableAtCaret(psiFile);

            return  executable != null &&
                    executable.getExecutionProcessor() != null && executable.getExecutionProcessor().canExecute();
        }
        return false;
    }
View Full Code Here

        }
        return false;
    }

    public void invoke(@NotNull Project project, Editor editor, PsiFile psiFile) throws IncorrectOperationException {
        ExecutablePsiElement executable = PsiUtil.lookupExecutableAtCaret(psiFile);
        StatementExecutionManager executionManager = StatementExecutionManager.getInstance(project);
        executionManager.fireExecution(executable.getExecutionProcessor());
        DocumentUtil.refreshEditorAnnotations(executable.getFile());
    }
View Full Code Here

            }
        }
    }

    private void annotateExecutable(PsiElement psiElement, AnnotationHolder holder) {
        ExecutablePsiElement executable = (ExecutablePsiElement) psiElement;
        if (!executable.isNestedExecutable()) {
            StatementExecutionProcessor executionProcessor = executable.getExecutionProcessor();
            if (executionProcessor != null) {
                Annotation annotation = holder.createInfoAnnotation(psiElement, null);
                annotation.setGutterIconRenderer(new StatementGutterRenderer(executionProcessor));
            }
        }
View Full Code Here

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

        return null;
    }
View Full Code Here

        return new NamedElementTypeParser(this);
    }

    public PsiElement createPsiElement(ASTNode astNode) {
        return is(ElementTypeAttribute.ROOT) ? new RootPsiElement(astNode, this) :
               is(ElementTypeAttribute.EXECUTABLE) ? new ExecutablePsiElement(astNode, this) :
                                new NamedPsiElement(astNode, this);
    }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.language.common.psi.ExecutablePsiElement

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.