Package com.dubture.twig.core.documentModel.dom

Examples of com.dubture.twig.core.documentModel.dom.AttrImplForTwig


        // 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 com.dubture.twig.core.documentModel.dom.AttrImplForTwig

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.