Examples of overlapsWith()


Examples of org.eclipse.jface.text.Position.overlapsWith()

        gapOffset= (previous != null) ? previous.getOffset() + previous.getLength() : 0;
        gap.setOffset(gapOffset);
        gap.setLength(current.getOffset() - gapOffset);
        if ((includeZeroLengthPartitions && overlapsOrTouches(gap, offset, length)) ||
            (gap.getLength() > 0 && gap.overlapsWith(offset, length))) {
          start= Math.max(offset, gapOffset);
          end= Math.min(endOffset, gap.getOffset() + gap.getLength());
          list.add(new TypedRegion(start, end - start, IDocument.DEFAULT_CONTENT_TYPE));
        }
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

      if (previous != null) {
        gapOffset= previous.getOffset() + previous.getLength();
        gap.setOffset(gapOffset);
        gap.setLength(fDocument.getLength() - gapOffset);
        if ((includeZeroLengthPartitions && overlapsOrTouches(gap, offset, length)) ||
            (gap.getLength() > 0 && gap.overlapsWith(offset, length))) {
          start= Math.max(offset, gapOffset);
          end= Math.min(endOffset, fDocument.getLength());
          list.add(new TypedRegion(start, end - start, IDocument.DEFAULT_CONTENT_TYPE));
        }
      }
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

        for (int i= 0; e.hasNext(); i++) {

          Annotation a= (Annotation) e.next();
          Position p= fModel.getPosition(a);

          if (p == null || !p.overlapsWith(visible.getOffset(), visible.getLength()))
            continue;

          int annotationOffset= Math.max(p.getOffset(), visible.getOffset());
          int annotationEnd= Math.min(p.getOffset() + p.getLength(), visible.getOffset() + visible.getLength());
          int annotationLength= annotationEnd - annotationOffset;
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

        int temp = current.getOffset() - gap.getOffset();
       
        if(temp>=0){
          gap.setLength(temp);
          if ((includeZeroLengthPartitions && overlapsOrTouches(gap, offset, length)) ||
              (gap.getLength() > 0 && gap.overlapsWith(offset, length))) {
            start= Math.max(offset, gapOffset);
            end= Math.min(endOffset, gap.getOffset() + gap.getLength());
            list.add(new TypedRegion(start, end - start, IDocument.DEFAULT_CONTENT_TYPE));
          }
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

      if (previous != null) {
        gapOffset= previous.getOffset() + previous.getLength();
        gap.setOffset(gapOffset);
        gap.setLength(fDocument.getLength() - gapOffset);
        if ((includeZeroLengthPartitions && overlapsOrTouches(gap, offset, length)) ||
            (gap.getLength() > 0 && gap.overlapsWith(offset, length))) {
          start= Math.max(offset, gapOffset);
          end= Math.min(endOffset, fDocument.getLength());
          list.add(new TypedRegion(start, end - start, IDocument.DEFAULT_CONTENT_TYPE));
        }
      }
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

          Position[] positions= fDocument.getPositions(categories[i]);

          for (int j= 0; j < positions.length; j++) {

            Position p= positions[j];
            if (p.overlapsWith(offset, length)) {

              if (offset < p.getOffset())
                fOverlappingPositionReferences.add(new PositionReference(p, true, categories[i]));

              if (p.getOffset() + p.getLength() < offset + length)
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

        Position position= fModel.getPosition(annotation);
        if (position == null)
          continue;

        if (!position.overlapsWith(topLeft, viewPort))
          continue;

        try {

          int offset= position.getOffset();
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

      Position p= model.getPosition(a);
      if (p == null || p.isDeleted())
        continue;

      if (p.overlapsWith(lineStart, lineLength) || p.length == 0 && p.offset == lineStart + lineLength)
        return true;
    }

    return false;
  }
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

        // https://bugs.eclipse.org/bugs/show_bug.cgi?id=20284
        // Position.overlapsWith returns false if the position just starts at the end
        // of the specified range. If the position has zero length, we want to include it anyhow
        int viewPortSize= position.getLength() == 0 ? viewPort + 1 : viewPort;
        if (!position.overlapsWith(topLeft, viewPortSize))
          continue;

        try {

          int offset= position.getOffset();
View Full Code Here

Examples of org.eclipse.jface.text.Position.overlapsWith()

      if (position == null)
        continue;

      // https://bugs.eclipse.org/bugs/show_bug.cgi?id=217710
      int extendedVLength= position.getLength() == 0 ? vLength + 1 : vLength;
      if (!position.overlapsWith(vOffset, extendedVLength))
        continue;

      int lay= IAnnotationAccessExtension.DEFAULT_LAYER;
      if (fAnnotationAccessExtension != null)
        lay= fAnnotationAccessExtension.getLayer(annotation);
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.