Examples of computeIndexInCategory()


Examples of org.eclipse.jface.text.IDocument.computeIndexInCategory()

      int reparseStart= line.getOffset();
      int partitionStart= -1;
      String contentType= null;
      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();
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.computeIndexInCategory()

      // remove all positions behind lastScannedPosition since there aren't any further types
      if (lastScannedPosition != reparseStart) {
        // if this condition is not met, nothing has been scanned because of a deletion
        ++ lastScannedPosition;
      }
      first= d.computeIndexInCategory(fPositionCategory, lastScannedPosition);
      category= d.getPositions(fPositionCategory);

      TypedPosition p;
      while (first < category.length) {
        p= (TypedPosition) category[first++];
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.computeIndexInCategory()

        /*
         * determine character position at which the scanner starts:
         * first position behind the last non-default partition the actual position is not involved with
         */

        first= d.computeIndexInCategory(fPositionCategory, e.getOffset());

        Position p= null;
        do {
          --first;
          if (first < 0)
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.computeIndexInCategory()

      // remove all positions behind lastScannedPosition since there aren't any further types
      if (lastScannedPosition != reparseStart) {
        // if this condition is not met, nothing has been scanned because of a delete
        ++ lastScannedPosition;
      }
      first= d.computeIndexInCategory(fPositionCategory, lastScannedPosition);

      TypedPosition p;
      while (first < category.length) {
        p= (TypedPosition) category[first++];
        d.removePosition(fPositionCategory, p);
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.computeIndexInCategory()

   */
  public boolean affectsPositions(DocumentEvent event) {
    IDocument document= event.getDocument();
    try {

      int index= document.computeIndexInCategory(getCategory(), event.getOffset());
      Position[] fragments= document.getPositions(getCategory());

      if (0 < index) {
        Position fragment= fragments[index - 1];
        if (fragment.overlapsWith(event.getOffset(), event.getLength()))
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.computeIndexInCategory()

        /*
         * determine character position at which the scanner starts:
         * first position behind the last non-default partition the actual position is not involved with
         */

        first= d.computeIndexInCategory(fPositionCategory, e.getOffset());

        Position p= null;
        do {
          --first;
          if (first < 0)
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.computeIndexInCategory()

      // remove all positions behind lastScannedPosition since there aren't any further types
      if (lastScannedPosition != reparseStart) {
        // if this condition is not met, nothing has been scanned because of a delete
        ++ lastScannedPosition;
      }
      first= d.computeIndexInCategory(fPositionCategory, lastScannedPosition);

      TypedPosition p;
      while (first < category.length) {
        p= (TypedPosition) category[first++];
        d.removePosition(fPositionCategory, p);
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.computeIndexInCategory()

      int reparseStart= line.getOffset();
      int partitionStart= -1;
      String contentType= null;
      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();
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.computeIndexInCategory()

      // remove all positions behind lastScannedPosition since there aren't any further types
      if (lastScannedPosition != reparseStart) {
        // if this condition is not met, nothing has been scanned because of a deletion
        ++ lastScannedPosition;
      }
      first= d.computeIndexInCategory(fPositionCategory, lastScannedPosition);
      category= d.getPositions(fPositionCategory);

      TypedPosition p;
      while (first < category.length) {
        p= (TypedPosition) category[first++];
View Full Code Here

Examples of org.eclipse.jface.text.IDocument.computeIndexInCategory()

            /*
             * This should be the index of the next partition that starts
             * that starts after the event offset. Used to limit the extent
             * of reparsing partitions that may have changed.
             */
            int first = d.computeIndexInCategory(fPositionCategory,
                    fReparseStart);
            if (first >= category.length) {
                first = Math.max(0,category.length-1);
            }
           
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.