Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.TypedPosition.includes()


      int newLength= e.getText() == null ? 0 : e.getText().length();

      int first= d.computeIndexInCategory(fPositionCategory, reparseStart);
      if (first > 0)  {
        TypedPosition partition= (TypedPosition) category[first - 1];
        if (partition.includes(reparseStart)) {
          partitionStart= partition.getOffset();
          contentType= partition.getType();
          if (e.getOffset() == partition.getOffset() + partition.getLength())
            reparseStart= partitionStart;
          -- first;
View Full Code Here


   */
  public String getContentType(int offset) {
    checkInitialization();

    TypedPosition p= findClosestPosition(offset);
    if (p != null && p.includes(offset))
      return p.getType();

    return IDocument.DEFAULT_CONTENT_TYPE;
  }

View Full Code Here

        if (index == 0)
          return new TypedRegion(0, next.offset, IDocument.DEFAULT_CONTENT_TYPE);

        TypedPosition previous= (TypedPosition) category[index - 1];
        if (previous.includes(offset))
          return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());

        int endOffset= previous.getOffset() + previous.getLength();
        return new TypedRegion(endOffset, next.getOffset() - endOffset, IDocument.DEFAULT_CONTENT_TYPE);
      }
View Full Code Here

        int endOffset= previous.getOffset() + previous.getLength();
        return new TypedRegion(endOffset, next.getOffset() - endOffset, IDocument.DEFAULT_CONTENT_TYPE);
      }

      TypedPosition previous= (TypedPosition) category[category.length - 1];
      if (previous.includes(offset))
        return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());

      int endOffset= previous.getOffset() + previous.getLength();
      return new TypedRegion(endOffset, fDocument.getLength() - endOffset, IDocument.DEFAULT_CONTENT_TYPE);
View Full Code Here

   * @see IDocumentPartitioner#getContentType
   */
  public String getContentType(int offset) {

    TypedPosition p= findClosestPosition(offset);
    if (p != null && p.includes(offset))
      return p.getType();

    return IDocument.DEFAULT_CONTENT_TYPE;
  }

View Full Code Here

        if (index == 0)
          return new TypedRegion(0, next.offset, IDocument.DEFAULT_CONTENT_TYPE);

        TypedPosition previous= (TypedPosition) category[index - 1];
        if (previous.includes(offset))
          return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());

        int endOffset= previous.getOffset() + previous.getLength();
        return new TypedRegion(endOffset, next.getOffset() - endOffset, IDocument.DEFAULT_CONTENT_TYPE);
      }
View Full Code Here

        int endOffset= previous.getOffset() + previous.getLength();
        return new TypedRegion(endOffset, next.getOffset() - endOffset, IDocument.DEFAULT_CONTENT_TYPE);
      }

      TypedPosition previous= (TypedPosition) category[category.length - 1];
      if (previous.includes(offset))
        return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());

      int endOffset= previous.getOffset() + previous.getLength();
      return new TypedRegion(endOffset, fDocument.getLength() - endOffset, IDocument.DEFAULT_CONTENT_TYPE);
View Full Code Here

      int newLength= e.getText() == null ? 0 : e.getText().length();

      int first= d.computeIndexInCategory(fPositionCategory, reparseStart);
      if (first > 0)  {
        TypedPosition partition= (TypedPosition) category[first - 1];
        if (partition.includes(reparseStart)) {
          partitionStart= partition.getOffset();
          contentType= partition.getType();
          if (e.getOffset() == partition.getOffset() + partition.getLength())
            reparseStart= partitionStart;
          -- first;
View Full Code Here

   */
  public String getContentType(int offset) {
    checkInitialization();

    TypedPosition p= findClosestPosition(offset);
    if (p != null && p.includes(offset))
      return p.getType();

    return IDocument.DEFAULT_CONTENT_TYPE;
  }

View Full Code Here

        if (index == 0)
          return new TypedRegion(0, next.offset, IDocument.DEFAULT_CONTENT_TYPE);

        TypedPosition previous= (TypedPosition) category[index - 1];
        if (previous.includes(offset))
          return new TypedRegion(previous.getOffset(), previous.getLength(), previous.getType());

        int endOffset= previous.getOffset() + previous.getLength();
        return new TypedRegion(endOffset, next.getOffset() - endOffset, IDocument.DEFAULT_CONTENT_TYPE);
      }
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.