Package org.eclipse.wst.sse.core.internal.provisional.text

Examples of org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer


                    .getRegionAtCharacterOffset(lineStart);
            int phpContentStartOffset = sdRegion
                    .getStartOffset(phpScriptRegion);

            if (phpScriptRegion instanceof ITextRegionContainer) {
                ITextRegionContainer container = (ITextRegionContainer) phpScriptRegion;
                phpScriptRegion = container
                        .getRegionAtCharacterOffset(lineStart);
                phpContentStartOffset += phpScriptRegion.getStart();
            }

            if (phpScriptRegion instanceof ITwigScriptRegion) {
View Full Code Here


                scriptRegion = sdRegion.getRegionAtCharacterOffset(offset);
            }
            int regionStart = sdRegion.getStartOffset(scriptRegion);
            // in case of container we have the extract the PhpScriptRegion
            if (scriptRegion instanceof ITextRegionContainer) {
                ITextRegionContainer container = (ITextRegionContainer) scriptRegion;
                scriptRegion = container.getRegionAtCharacterOffset(offset);
                regionStart += scriptRegion.getStart();
            }
            if (scriptRegion instanceof ITwigScriptRegion) {
                if (tokenType == TwigRegionTypes.TWIG_DELIMITER
                        && document.getChar(regionStart + token.getStart()) == '.') {
View Full Code Here

                scriptRegion = sdRegion.getRegionAtCharacterOffset(offset);
            }
            int regionStart = sdRegion.getStartOffset(scriptRegion);
            // in case of container we have the extract the PhpScriptRegion
            if (scriptRegion instanceof ITextRegionContainer) {
                ITextRegionContainer container = (ITextRegionContainer) scriptRegion;
                scriptRegion = container.getRegionAtCharacterOffset(offset);
                regionStart += scriptRegion.getStart();
            }
            if (scriptRegion instanceof ITwigScriptRegion) {
                if (tokenType == TwigRegionTypes.TWIG_DELIMITER
                        && document.getChar(regionStart + token.getStart()) == ':') {
View Full Code Here

        // get over the attribute and look for php attributes

        NamedNodeMap attributes = node.getAttributes();
        for (int i = 0; i < attributes.getLength(); i++) {
            AttrImplForTwig attribute = (AttrImplForTwig) attributes.item(i);
            ITextRegionContainer container = null;
            if (attribute.getNameRegion() instanceof ITextRegionContainer) {
                container = (ITextRegionContainer) attribute.getNameRegion();
            }

            if (attribute.getValueRegion() instanceof ITextRegionContainer) {
                container = (ITextRegionContainer) attribute.getValueRegion();
            }

            if (container != null
                    && (container.getFirstRegion().getType()
                            .equals(TwigRegionContext.TWIG_OPEN) || container
                            .getFirstRegion().getType()
                            .equals(TwigRegionContext.TWIG_STMT_OPEN))) {
                TwigFormatter phpFormatter = new TwigFormatter(
                        attribute.getStartOffset(), attribute.getEndOffset());
                phpFormatter.format(attribute, contraints);
View Full Code Here

TOP

Related Classes of org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer

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.