Examples of containsPosition()


Examples of com.barrybecker4.game.twoplayer.go.board.elements.group.GoGroupSet.containsPosition()

        GoGroupSet groups = new GoGroupSet();

        for ( int i = 1; i <= board_.getNumRows(); i++ )  {
            for ( int j = 1; j <= board_.getNumCols(); j++ ) {
                GoBoardPosition pos = (GoBoardPosition)board_.getPosition(i, j);
                if (pos.isOccupied() && !groups.containsPosition(pos)) {
                    // would this run faster if  second param was false?
                    groups.add(new GoGroup(findGroupFromInitialPosition(pos, true)));
                }
            }
        }
View Full Code Here

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

        // remove all affected positions
        while (first < category.length) {
          TypedPosition p= (TypedPosition) category[first];
          if (lastScannedPosition >= p.offset + p.length ||
              (p.overlapsWith(start, length) &&
                 (!d.containsPosition(fPositionCategory, start, length) ||
                  !contentType.equals(p.getType())))) {

            rememberRegion(p.offset, p.length);
            d.removePosition(fPositionCategory, p);
            ++ first;
View Full Code Here

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

            break;
        }

        // if position already exists and we have scanned at least the
        // area covered by the event, we are done
        if (d.containsPosition(fPositionCategory, start, length)) {
          if (lastScannedPosition >= e.getOffset() + newLength)
            return createRegion();
          ++ first;
        } else {
          // insert the new type position
View Full Code Here

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

        // remove all affected positions
        while (first < category.length) {
          TypedPosition p= (TypedPosition) category[first];
          if (lastScannedPosition >= p.offset + p.length ||
              (p.overlapsWith(start, length) &&
                 (!d.containsPosition(fPositionCategory, start, length) ||
                  !contentType.equals(p.getType())))) {

            rememberRegion(p.offset, p.length);
            d.removePosition(fPositionCategory, p);
            ++ first;
View Full Code Here

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

          } else
            break;
        }

        // if position already exists we are done
        if (d.containsPosition(fPositionCategory, start, length))
          return createRegion();

        // insert the new type position
        try {
          d.addPosition(fPositionCategory, new TypedPosition(start, length, contentType));
View Full Code Here

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

        // remove all affected positions
        while (first < category.length) {
          TypedPosition p= (TypedPosition) category[first];
          if (lastScannedPosition >= p.offset + p.length ||
              (p.overlapsWith(start, length) &&
                 (!d.containsPosition(fPositionCategory, start, length) ||
                  !contentType.equals(p.getType())))) {

            rememberRegion(p.offset, p.length);
            d.removePosition(fPositionCategory, p);
            ++ first;
View Full Code Here

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

          } else
            break;
        }

        // if position already exists we are done
        if (d.containsPosition(fPositionCategory, start, length))
          return createRegion();

        // insert the new type position
        try {
          d.addPosition(fPositionCategory, new TypedPosition(start, length, contentType));
View Full Code Here

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

        // remove all affected positions
        while (first < category.length) {
          TypedPosition p= (TypedPosition) category[first];
          if (lastScannedPosition >= p.offset + p.length ||
              (p.overlapsWith(start, length) &&
                 (!d.containsPosition(fPositionCategory, start, length) ||
                  !contentType.equals(p.getType())))) {

            rememberRegion(p.offset, p.length);
            d.removePosition(fPositionCategory, p);
            ++ first;
View Full Code Here

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

            break;
        }

        // if position already exists and we have scanned at least the
        // area covered by the event, we are done
        if (d.containsPosition(fPositionCategory, start, length)) {
          if (lastScannedPosition >= e.getOffset() + newLength)
            return createRegion();
          ++ first;
        } else {
          // insert the new type position
View Full Code Here

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

                    CFEPartition p = (CFEPartition) category[first];
                  
                    //System.out.println("Checking if " + p.getType() + " " + p.offset + ":" + Integer.toString(p.offset+p.length) + " should be deleted.");
                    // Check if this partition needs to be removed.
                    if (lastScannedPosition >= p.offset + p.length
                            || (p.overlapsWith(start, length) && (!d
                                    .containsPosition(fPositionCategory, start,
                                            length) || !contentType.equals(p
                                    .getType())))) {
                        //System.out.println("It should be deleted.");
                       
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.