Package com.google.collide.shared.document

Examples of com.google.collide.shared.document.LineInfo.moveTo()


    do {
      if (!executor.onSearchLine(lineInfo.line(), lineInfo.number(), true)) {
        return false;
      }
    } while (lineInfo.line() != searchDirectionHelper.getViewportEndLine()
        && lineInfo.moveTo(searchDirectionHelper.isGoingDown()));

    /*
     * If we stopped because lineInfo == endline then we need to continue async
     * scanning, otherwise this moveTo call will fail and we won't bother. We
     * also have to check for the case where the viewport was already scrolled
View Full Code Here


     * If we stopped because lineInfo == endline then we need to continue async
     * scanning, otherwise this moveTo call will fail and we won't bother. We
     * also have to check for the case where the viewport was already scrolled
     * to the very bottom or top of the document.
     */
    return lineInfo.moveTo(searchDirectionHelper.isGoingDown())
        || (searchDirectionHelper.canWrapDocument() && shouldWrapDocument);
  }

  /**
   * Removes the search task anchors after the task has completed.
View Full Code Here

    // Try to set the line at the top or bottom of viewport (depending on
    // direction), if we fail then wrap around the document. We don't have to
    // check shoudl wrap here since the viewport scan would have returned false.
    LineInfo startAnchorLine = searchDirectionHelper.getViewportEndLineInfo();
    if (!startAnchorLine.moveTo(searchDirectionHelper.isGoingDown())) {
      startAnchorLine = searchDirectionHelper.getWrapDocumentLine();
    }

    if (searchTaskAnchor == null) {
      searchTaskAnchor =
View Full Code Here

        if (!executor.onSearchLine(lineInfo.line(), lineInfo.number(), false)) {
          dispatchSearchDone();
          return false;
        }

        if (!lineInfo.moveTo(searchDirectionHelper.isGoingDown())) {
          if (shouldWrapDocument) {
            lineInfo = searchDirectionHelper.getWrapDocumentLine();
          } else {
            dispatchSearchDone();
            return false;
View Full Code Here

    while (curLine.line() != end.getLine()) {
      if (!lineVisitor.accept(curLine.line(), curLine.number(), 0, curLine.line().length())) {
        return;
      }

      if (!curLine.moveTo(iterateForward)) {
        throw new IllegalStateException(
            "Could not find the requested ending line while visiting position range");
      }
    }
View Full Code Here

        return;
      }
    }

    LineInfo curLine = start.getLineInfo();
    curLine.moveTo(iterateForward);

    while (curLine.line() != end.getLine()) {
      if (!lineVisitor.accept(curLine.line(), curLine.number(), 0, curLine.line().length())) {
        return;
      }
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.