Examples of IStructuredDocumentRegion


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

    }
  }

  protected String getOtherClose(Node notATagNode) {
    if (notATagNode instanceof IDOMNode) {
      IStructuredDocumentRegion node = ((IDOMNode) notATagNode).getStartStructuredDocumentRegion();
      if ((node != null) && (node.getNumberOfRegions() > 1) && node.getRegions().get(0).getType().equals(DOMJSPRegionContextsPrivateCopy.JSP_DIRECTIVE_OPEN)) {
        return "%>"; //$NON-NLS-1$
      }
    }
    return null;
  }
View Full Code Here

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

    if (hasEndTag())
      return;
    ElementImpl end = (ElementImpl) endTag;

    // move the end flat node from the end tag
    IStructuredDocumentRegion flatNode = end.getEndStructuredDocumentRegion();
    if (flatNode == null)
      return;
    end.setEndStructuredDocumentRegion(null);
    setEndStructuredDocumentRegion(flatNode);
  }
View Full Code Here

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

  /**
   * getFirstStructuredDocumentRegion method
   *
   */
  public IStructuredDocumentRegion getFirstStructuredDocumentRegion() {
    IStructuredDocumentRegion flatNode = getStructuredDocumentRegion();
    if (flatNode != null)
      return StructuredDocumentRegionUtil.getStructuredDocumentRegion(flatNode);
    return StructuredDocumentRegionUtil.getStructuredDocumentRegion(this.endStructuredDocumentRegion);
  }
View Full Code Here

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

   * getStartEndOffset method
   *
   * @return int
   */
  public int getStartEndOffset() {
    IStructuredDocumentRegion flatNode = getStructuredDocumentRegion();
    if (flatNode != null)
      return flatNode.getEnd();
    return super.getStartOffset();
  }
View Full Code Here

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

  }

  /**
   */
  public boolean isClosed() {
    IStructuredDocumentRegion flatNode = null;
    if (isEmptyTag() || !isContainer()) {
      flatNode = getStructuredDocumentRegion();
      if (flatNode == null)
        return true; // will be generated
    }
View Full Code Here

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

  }

  /**
   */
  public boolean isStartTagClosed() {
    IStructuredDocumentRegion flatNode = getStructuredDocumentRegion();
    if (flatNode == null)
      return true; // will be generated
    String regionType = StructuredDocumentRegionUtil.getLastRegionType(flatNode);
    if (isCommentTag()) {
      return (isNestedClosedComment(regionType) || regionType == DOMRegionContext.XML_COMMENT_CLOSE);
View Full Code Here

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

    this.attrNodes = attrNodes;
    if (end == null)
      return null;

    // move the end flat node to the end tag
    IStructuredDocumentRegion flatNode = getEndStructuredDocumentRegion();
    if (flatNode == null)
      return null;
    setEndStructuredDocumentRegion(null);
    end.setEndStructuredDocumentRegion(flatNode);
    return end;
View Full Code Here

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

      buffer.append(tagName);
    }
    if (buffer.length() == 0)
      buffer.append(tagName);

    IStructuredDocumentRegion startStructuredDocumentRegion = getStartStructuredDocumentRegion();
    if (startStructuredDocumentRegion != null) {
      buffer.append('@');
      buffer.append(startStructuredDocumentRegion.toString());
    }
    IStructuredDocumentRegion endStructuredDocumentRegion = getEndStructuredDocumentRegion();
    if (endStructuredDocumentRegion != null) {
      buffer.append('@');
      buffer.append(endStructuredDocumentRegion.toString());
    }
    return buffer.toString();
  }
View Full Code Here

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

    // iterate existing attributes from current node
    IDOMNode xmlNode = fModelUtil.getXMLNode(documentPosition);
    if (xmlNode == null)
      return false;
   
    IStructuredDocumentRegion sdRegion = xmlNode.getFirstStructuredDocumentRegion();
    ITextRegionList regions = sdRegion.getRegions();
    ITextRegion r = null;
    String attrName = ""; //$NON-NLS-1$
    Object temp = null;
    Position p = null;
    HashMap map = ((AttributeContextInformation) fInfo).getAttr2RangeMap();

    // so we can add ranges in order
    StyleRange[] sorted = new StyleRange[fInfo.getInformationDisplayString().length()];
    for (int i = 0; i < regions.size(); i++) {
      r = regions.get(i);
      if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
        attrName = sdRegion.getText(r);
        temp = map.get(attrName);
        if (temp != null) {
          p = (Position) temp;
          sorted[p.offset] = new StyleRange(p.offset, p.length, null, null, SWT.BOLD);
        }
View Full Code Here

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

     * need to take care of special cases w/ ambiguous regions <tag>|
     * </tag> also end tags..
     */
    IContextInformation[] results = EMPTY_CONTEXT_INFO;

    IStructuredDocumentRegion sdRegion = fModelUtil.getDocument().getRegionAtCharacterOffset(offset);
    if (!canProposeInfo(sdRegion)) {
      return EMPTY_CONTEXT_INFO;
    }

    IDOMNode node = fModelUtil.getXMLNode(offset);
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.