Package org.eclipse.wst.sse.core.internal.parser

Examples of org.eclipse.wst.sse.core.internal.parser.ContextRegion


                length++;
            }
            bufferedTokens = new LinkedList<ITextRegion>();
            checkForTodo(bufferedTokens, PHPRegionTypes.PHPDOC_COMMENT, 0,
                    length, buffer.toString());
            bufferedTokens.add(new ContextRegion(yylex, 0, yylength(),
                    yylength()));
            yylex = removeFromBuffer();
        } else if (PHPPartitionTypes.isPHPCommentState(yylex)) {
            bufferedTokens = new LinkedList<ITextRegion>();
            checkForTodo(bufferedTokens, yylex, 0, yylength(), yytext());
View Full Code Here


        ITextRegion tRegion = null;
        while (matcher != null) {
            int startIndex = matcher.start();
            int endIndex = matcher.end();
            if (startIndex != startPosition) {
                tRegion = new ContextRegion(token,
                        commentStart + startPosition, startIndex
                                - startPosition, startIndex - startPosition);
                result.add(tRegion);
            }
            tRegion = new ContextRegion(PHPRegionTypes.PHPDOC_TODO,
                    commentStart + startIndex, endIndex - startIndex, endIndex
                            - startIndex);
            result.add(tRegion);
            startPosition = endIndex;
            matcher = getMinimalMatcher(matchers, startPosition);
        }
        final int length = commentLength - startPosition;
        if (length != 0) {
            result.add(new ContextRegion(token, commentStart + startPosition,
                    length, length));
        }
    }
View Full Code Here

            if (phpScriptRegion instanceof ITwigScriptRegion) {
                ITwigScriptRegion scriptRegion = (ITwigScriptRegion) phpScriptRegion;
                // the region we are trying to check if it is the indent base
                // for the line we need to format
                ContextRegion checkedRegion = (ContextRegion) scriptRegion
                        .getTwigToken(lineStart - phpContentStartOffset);
                // the current region we need to format
                ContextRegion currentRegion = (ContextRegion) scriptRegion
                        .getTwigToken(forOffset - phpContentStartOffset);
                String checkedType = checkedRegion.getType();
                String currentType = currentRegion.getType();
                // if we are in the beginning of a comment (DOC or Multi
                // comment) and we have before another
                // Doc comment or Multi comment, the base line we'll be the
                // beginning of the previous multi comment
View Full Code Here

TOP

Related Classes of org.eclipse.wst.sse.core.internal.parser.ContextRegion

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.