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

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


        if (psiElement instanceof PsiComment) {
            return "/*...*/";
        }

        if (psiElement instanceof ChameleonPsiElement) {
            ChameleonPsiElement chameleonPsiElement = (ChameleonPsiElement) psiElement;
            return chameleonPsiElement.getLanguage().getDisplayName() + " block";
        }
        return "";
    }
View Full Code Here


            }
        }
    }

    private void annotateChameleon(PsiElement psiElement, AnnotationHolder holder) {
        ChameleonPsiElement executable = (ChameleonPsiElement) psiElement;
/*
        if (!executable.isNestedExecutable()) {
            StatementExecutionProcessor executionProcessor = executable.getExecutionProcessor();
            if (executionProcessor != null) {
                Annotation annotation = holder.createInfoAnnotation(psiElement, null);
View Full Code Here

                            executablePsiElement.getNode(),
                            executablePsiElement.getTextRange());
                    descriptors.add(foldingDescriptor);
                }
            } else if (child instanceof ChameleonPsiElement) {
                ChameleonPsiElement chameleonPsiElement = (ChameleonPsiElement) child;
                FoldingDescriptor foldingDescriptor = new FoldingDescriptor(
                        chameleonPsiElement.getNode(),
                        chameleonPsiElement.getTextRange());
                descriptors.add(foldingDescriptor);


                FoldingBuilder foldingBuilder = LanguageFolding.INSTANCE.forLanguage(chameleonPsiElement.getLanguage());
                FoldingDescriptor[] nestedDescriptors = foldingBuilder.buildFoldRegions(chameleonPsiElement.getNode(), document);
                descriptors.addAll(Arrays.asList(nestedDescriptors));

            }
            child = child.getNextSibling();
        }
View Full Code Here

                if (psiElement instanceof DBLanguageFile) {
                    DBLanguageFile file = (DBLanguageFile) psiElement;
                    return file.getName();
                }
                if (psiElement instanceof ChameleonPsiElement) {
                    ChameleonPsiElement chameleonPsiElement = (ChameleonPsiElement) psiElement;
                    //return chameleonPsiElement.getLanguage().getDisplayName() + " block";
                    // todo make this dynamic
                    return "PL/SQL block";
                }
                return psiElement.getText();
View Full Code Here

    }

    private CodeStyleCustomSettings getCodeStyleSettings(PsiElement child) {
        CodeStyleCustomSettings codeStyleCustomSettings = this.codeStyleCustomSettings;
        if (child instanceof ChameleonPsiElement) {
            ChameleonPsiElement element = (ChameleonPsiElement) child;
            DBLanguage language = (DBLanguage) PsiUtil.getLanguage(element);
            codeStyleCustomSettings = language.getCodeStyleSettings(psiElement.getProject());
        }
        return codeStyleCustomSettings;
    }
View Full Code Here

    public DBObjectType getVirtualObjectType() {
        return null;
    }

    public PsiElement createPsiElement(ASTNode astNode) {
        return new ChameleonPsiElement(astNode, this);
    }
View Full Code Here

TOP

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

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.