Package org.eclipse.php.internal.core.documentModel.dom

Examples of org.eclipse.php.internal.core.documentModel.dom.AttrImplForPhp


    // get over the attribute and look for php attributes

    NamedNodeMap attributes = node.getAttributes();
    for (int i = 0; i < attributes.getLength(); i++) {
      AttrImplForPhp attribute = (AttrImplForPhp) 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(PHPRegionContext.PHP_OPEN)) {
        PhpFormatter phpFormatter = new PhpFormatter(
            attribute.getStartOffset(), attribute.getEndOffset());
        phpFormatter.format(attribute, contraints);
      }
    }

  }
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.documentModel.dom.AttrImplForPhp

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.