Examples of ITextRegionContainer


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

    ITextRegion tRegion = sdRegion.getRegionAtCharacterOffset(offset);
    int regionStart = sdRegion.getStartOffset(tRegion);

    // in case of container we have the extract the PhpScriptRegion
    if (tRegion instanceof ITextRegionContainer) {
      ITextRegionContainer container = (ITextRegionContainer) tRegion;
      tRegion = container.getRegionAtCharacterOffset(offset);
      regionStart += tRegion.getStart();
    }

    if (tRegion instanceof IPhpScriptRegion) {
      IPhpScriptRegion scriptRegion = (IPhpScriptRegion) tRegion;
View Full Code Here

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

      // this is extremely rare, but valid
      else if (type == DOMRegionContext.WHITE_SPACE) {
        ITextRegion lastRegion = currentNode.getLastRegion();
        // pack the embedded container with this region
        if (lastRegion instanceof ITextRegionContainer) {
          ITextRegionContainer container = (ITextRegionContainer) lastRegion;
          container.getRegions().add(region);
          // containers must have parent set ...
          // setting for EACH subregion is redundent, but not sure
          // where else to do, so will do here for now.
          container.setParent(currentNode);
          // DW 4/16/2003 regions no longer have parents
          // region.setParent(container);
          if (region instanceof ITextRegionContainer) {
            ((ITextRegionContainer) region).setParent(currentNode);
          }
          region.adjustStart(container.getLength()
              - region.getStart());
        }
        currentNode.getLastRegion().adjustLength(region.getLength());
        currentNode.adjustLength(region.getLength());
      } else if (type == DOMRegionContext.UNDEFINED
View Full Code Here

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

      if (tRegion != null) {
        int regionStart = sdRegion.getStartOffset(tRegion);

        // in case of container we have the extract the PhpScriptRegion
        if (tRegion instanceof ITextRegionContainer) {
          ITextRegionContainer container = (ITextRegionContainer) tRegion;
          tRegion = container.getRegionAtCharacterOffset(offset);
          regionStart += tRegion.getStart();
        }

        if (tRegion != null && tRegion instanceof IPhpScriptRegion) {
          IPhpScriptRegion scriptRegion = (IPhpScriptRegion) tRegion;
View Full Code Here

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

      int regionStart = sdRegion.getStartOffset(tRegion);

      // in case of container we have the extract the PhpScriptRegion
      if (tRegion != null && tRegion instanceof ITextRegionContainer) {
        ITextRegionContainer container = (ITextRegionContainer) tRegion;
        tRegion = container.getRegionAtCharacterOffset(offset);
        regionStart += tRegion.getStart();
      }

      if (tRegion != null && tRegion instanceof IPhpScriptRegion) {
        IPhpScriptRegion scriptRegion = (IPhpScriptRegion) tRegion;
View Full Code Here

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 IPhpScriptRegion) {
View Full Code Here

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 IPhpScriptRegion
View Full Code Here

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

    }
    int regionStart = sdRegion.getStartOffset(tRegion);

    // in case of container we have the extract the PhpScriptRegion
    if (tRegion instanceof ITextRegionContainer) {
      ITextRegionContainer container = (ITextRegionContainer) tRegion;
      tRegion = container.getRegionAtCharacterOffset(offset);
      regionStart += tRegion.getStart();
    }
    do {
      if (tRegion instanceof IPhpScriptRegion) {
        IPhpScriptRegion scriptRegion = (IPhpScriptRegion) tRegion;
View Full Code Here

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

    // 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

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

        }

        int regionStart = sdRegion.getStartOffset(tRegion);
        // in case of container we have the extract the PhpScriptRegion
        if (tRegion instanceof ITextRegionContainer) {
            ITextRegionContainer container = (ITextRegionContainer) tRegion;
            tRegion = container.getRegionAtCharacterOffset(offset);
            regionStart += tRegion.getStart();
        }

        if (tRegion instanceof ITwigScriptRegion) {
            ITwigScriptRegion scriptRegion = (ITwigScriptRegion) tRegion;
View Full Code Here

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

        }

        int regionStart = sdRegion.getStartOffset(tRegion);
        // in case of container we have the extract the PhpScriptRegion
        if (tRegion instanceof ITextRegionContainer) {
            ITextRegionContainer container = (ITextRegionContainer) tRegion;
            tRegion = container.getRegionAtCharacterOffset(offset);
            regionStart += tRegion.getStart();
        }
        if (tRegion instanceof ITwigScriptRegion) {
            ITwigScriptRegion scriptRegion = (ITwigScriptRegion) tRegion;
            tRegion = scriptRegion.getTwigToken(offset - regionStart);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.