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

Examples of com.dci.intellij.dbn.language.common.psi.lookup.ObjectLookupAdapter


    /*********************************************************
     *                   Lookup routines                     *
     *********************************************************/
    public Set<BasePsiElement> collectObjectPsiElements(Set<BasePsiElement> bucket, Set<DBObjectType> objectTypes, IdentifierCategory identifierCategory) {
        for (DBObjectType objectType : objectTypes) {
            PsiLookupAdapter lookupAdapter = new ObjectLookupAdapter(null, identifierCategory, objectType, null);
            bucket = lookupAdapter.collectInElement(this, bucket);
        }
        return bucket;
    }
View Full Code Here


        if (psiElement instanceof BasePsiElement) {
            BasePsiElement basePsiElement = (BasePsiElement) psiElement;
            BasePsiElement scope = basePsiElement.lookupEnclosingNamedPsiElement();

            DBObjectType objectType = aliasElement.getObjectType();
            ObjectLookupAdapter lookupInput = new ObjectLookupAdapter(aliasElement, objectType);

            BasePsiElement objectPsiElement = lookupInput.findInScope(scope);
            if (objectPsiElement == null) {
                scope = scope.lookupEnclosingSequencePsiElement();
                if (scope != null)
                    objectPsiElement = lookupInput.findInScope(scope);
            }
            if (objectPsiElement != null) {
                Set<BasePsiElement> virtualObjectPsiElements = new THashSet<BasePsiElement>();
                scope.collectVirtualObjectPsiElements(virtualObjectPsiElements, objectType);
                for (BasePsiElement virtualObjectPsiElement : virtualObjectPsiElements) {
View Full Code Here

        Iterator<PsiElement> children = PsiUtil.getChildrenIterator(scope);
        while (children.hasNext()) {
            PsiElement child = children.next();
            if (child instanceof BasePsiElement) {
                BasePsiElement basePsiElement = (BasePsiElement) child;
                ObjectLookupAdapter lookupInput = new ObjectLookupAdapter(null, objectType);
                BasePsiElement objectPsiElement = lookupInput.findInScope(basePsiElement);
                if (objectPsiElement != null && objectPsiElement instanceof IdentifierPsiElement) {
                    return (IdentifierPsiElement) objectPsiElement;
                }                                       
            }
            if (child == element) break;
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.language.common.psi.lookup.ObjectLookupAdapter

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.