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

Examples of com.dci.intellij.dbn.language.common.element.IterationElementType


                            parentElementType = null;
                            break;
                        }
                    }
                } else if (parentElementType instanceof IterationElementType) {
                    IterationElementType iteration = (IterationElementType) parentElementType;
                    TokenElementType[] separatorTokens = iteration.getSeparatorTokens();
                    if (separatorTokens != null) {
                        for (TokenElementType separatorToken : separatorTokens) {
                            nextPossibleTokens.add(separatorToken.getTokenType());
                        }
                    }
View Full Code Here


                        pathNode = null;
                        break;
                    }
                }
            } else if (elementType instanceof IterationElementType) {
                IterationElementType iterationElementType = (IterationElementType) elementType;
                TokenElementType[] separatorTokens = iterationElementType.getSeparatorTokens();
                if (separatorTokens == null) {
                    possibleLeafs.addAll(iterationElementType.getIteratedElementType().getLookupCache().getFirstPossibleLeafs());
                } else {
                    possibleLeafs.addAll(Arrays.asList(separatorTokens));
                }
            } else if (elementType instanceof QualifiedIdentifierElementType) {
                QualifiedIdentifierElementType qualifiedIdentifierElementType = (QualifiedIdentifierElementType) elementType;
View Full Code Here

                            parentElementType = null;
                            break;
                        }
                    }
                } else if (parentElementType instanceof IterationElementType) {
                    IterationElementType iteration = (IterationElementType) parentElementType;
                    TokenElementType[] separatorTokens = iteration.getSeparatorTokens();
                    if (separatorTokens == null) {
                        nextRequiredTokens.addAll(iteration.getLookupCache().getFirstPossibleTokens());
                    } else {
                        for (TokenElementType separatorToken : separatorTokens) {
                            nextRequiredTokens.add(separatorToken.getTokenType());
                        }
                    }
View Full Code Here

                        pathNode = null;
                        break;
                    }
                }
            } else if (elementType instanceof IterationElementType) {
                IterationElementType iteration = (IterationElementType) elementType;
                TokenElementType[] separatorTokens = iteration.getSeparatorTokens();
                Collections.addAll(requiredLeafs, separatorTokens);
            }
            if (pathNode != null) {
                index = pathNode.getCurrentSiblingIndex();
                pathNode = pathNode.getParent();
View Full Code Here

                        return true;
                    }
                }
            }
        } else if (getElementType() instanceof IterationElementType) {
            IterationElementType iterationElementType = (IterationElementType) getElementType();
            PsiElement psiElement = getLastChild();
            if (psiElement == null) {
                return true;
            } else if (psiElement instanceof BasePsiElement){
                BasePsiElement basePsiElement = (BasePsiElement) psiElement;
                return basePsiElement.getElementType() != iterationElementType.getIteratedElementType();
            } else {
                return psiElement instanceof PsiErrorElement;
            }
        }
        return false;
View Full Code Here

    public Set<LeafElementType> getNextPossibleLeafs(PathNode pathNode, CodeCompletionFilterSettings filterSettings) {
        ElementType parent = getParent();
        if (isIterationSeparator()) {
            if (parent instanceof IterationElementType) {
                IterationElementType iterationElementType = (IterationElementType) parent;
                /*return codeCompletionSettings.isSmart() ?
                        iterationElementType.getIteratedElementType().getFirstPossibleLeafs() :
                        iterationElementType.getIteratedElementType().getFirstRequiredLeafs();*/
                return iterationElementType.getIteratedElementType().getLookupCache().getFirstPossibleLeafs();
            } else if (parent instanceof QualifiedIdentifierElementType){
                return super.getNextPossibleLeafs(pathNode, filterSettings);
            }
        }
        if (parent instanceof WrapperElementType) {
View Full Code Here

    }

    public Set<LeafElementType> getNextRequiredLeafs(PathNode pathNode) {
        if (isIterationSeparator()) {
            if (getParent() instanceof IterationElementType) {
                IterationElementType iterationElementType = (IterationElementType) getParent();
                return iterationElementType.getIteratedElementType().getLookupCache().getFirstRequiredLeafs();
            } else if (getParent() instanceof QualifiedIdentifierElementType){
                return super.getNextRequiredLeafs(pathNode);
            }
        }
        return super.getNextRequiredLeafs(pathNode);
View Full Code Here

                    SequenceElementType sequenceElementType = (SequenceElementType) elementType;
                    if ( sequenceElementType.containsLandmarkTokenFromIndex(tokenType, parseNode.getCurrentSiblingIndex() + 1)) {
                        return -1;
                    }
                } else  if (elementType instanceof IterationElementType) {
                    IterationElementType iterationElementType = (IterationElementType) elementType;
                    if (iterationElementType.isSeparator(tokenType)) {
                        return -1;
                    }
                }
                parseNode = parseNode.getParent();
            }
View Full Code Here

            ElementType elementType = parentNode.getElementType();
            if (elementType instanceof SequenceElementType) {
                parentNode = advanceToLandmark_New(builder, node);

            } else if (elementType instanceof IterationElementType) {
                IterationElementType iterationElementType = (IterationElementType) elementType;
                if (iterationElementType.isSeparator(tokenType)) {
                    return parentNode;
                }
            }
            parentNode = parentNode.getParent();
        }
View Full Code Here

        logBegin(builder, optional, depth);

        ParsePathNode node = createParseNode(parentNode, builder.getCurrentOffset());
        PsiBuilder.Marker marker = builder.mark(node);

        IterationElementType elementType = getElementType();
        ElementType iteratedElementType = elementType.getIteratedElementType();
        TokenElementType[] separatorTokens = elementType.getSeparatorTokens();

        int elementCounter = 0;
        int matchedTokens = 0;
        //TokenType tokenType = (TokenType) builder.getTokenType();
        // check if the token objectType can be part of this iteration
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.language.common.element.IterationElementType

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.