Examples of number()


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

        int column = selectionModel.getCursorColumn();
        column = TextUtils.moveByWord(text, column, true, false);
        if (column == -1) {
          Line cursorLine = cursorLineInfo.line().getNextLine();
          if (cursorLine != null) {
            cursorLineInfo = new LineInfo(cursorLine, cursorLineInfo.number() + 1);
            column = 0;
          } else {
            column = LineUtils.getLastCursorColumn(cursorLine); // at last character
                                                          // in document
          }
View Full Code Here

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

        int column = selectionModel.getCursorColumn();
        column = TextUtils.moveByWord(text, column, false, false);
        if (column == -1) {
          Line cursorLine = cursorLineInfo.line().getPreviousLine();
          if (cursorLine != null) {
            cursorLineInfo = new LineInfo(cursorLine, cursorLineInfo.number() - 1);
            column = LineUtils.getLastCursorColumn(cursorLine);
          } else {
            column = 0; // at first character in document
          }
        }
View Full Code Here

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

        int column = selectionModel.getCursorColumn();
        column = TextUtils.moveByWord(text, column, true, true);
        if (column == -1) {
          Line cursorLine = cursorLineInfo.line().getNextLine();
          if (cursorLine != null) {
            cursorLineInfo = new LineInfo(cursorLine, cursorLineInfo.number() + 1);
            column = 0;
          } else {
            // at the last character in the document
            column = LineUtils.getLastCursorColumn(cursorLine);
          }
View Full Code Here

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

      @Override
      public boolean event(InputScheme scheme, SignalEvent event) {
        SelectionModel selectionModel = getInputController().getSelection();
        LineInfo cursorLineInfo =
            new LineInfo(selectionModel.getCursorLine(), selectionModel.getCursorLineNumber());
        int lineNumber = cursorLineInfo.number();
        boolean skippingEmptyLines = true;
        Line line;
        for (line = cursorLineInfo.line(); line.getNextLine() != null; line = line.getNextLine(),
            lineNumber++) {
          String text = line.getText();
View Full Code Here

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

      @Override
      public boolean event(InputScheme scheme, SignalEvent event) {
        SelectionModel selectionModel = getInputController().getSelection();
        LineInfo cursorLineInfo =
            new LineInfo(selectionModel.getCursorLine(), selectionModel.getCursorLineNumber());
        int lineNumber = cursorLineInfo.number();
        boolean skippingEmptyLines = true;
        Line line;
        for (line = cursorLineInfo.line(); line.getPreviousLine() != null; line =
            line.getPreviousLine(), lineNumber--) {
          String text = line.getText();
View Full Code Here

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

        startLineInfo.number() <= viewport.getBottomLineNumber(),
        "Editor: Search start line number not within viewport.");

    LineInfo lineInfo = startLineInfo.copy();
    do {
      if (!executor.onSearchLine(lineInfo.line(), lineInfo.number(), true)) {
        return false;
      }
    } while (lineInfo.line() != searchDirectionHelper.getViewportEndLine()
        && lineInfo.moveTo(searchDirectionHelper.isGoingDown()));
View Full Code Here

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

    }

    if (searchTaskAnchor == null) {
      searchTaskAnchor =
          document.getAnchorManager().createAnchor(SEARCH_TASK_ANCHOR, startAnchorLine.line(),
              startAnchorLine.number(), AnchorManager.IGNORE_COLUMN);
      searchTaskAnchor.setRemovalStrategy(RemovalStrategy.SHIFT);
    } else {
      document.getAnchorManager().moveAnchor(searchTaskAnchor, startAnchorLine.line(),
          startAnchorLine.number(), AnchorManager.IGNORE_COLUMN);
    }
View Full Code Here

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

          document.getAnchorManager().createAnchor(SEARCH_TASK_ANCHOR, startAnchorLine.line(),
              startAnchorLine.number(), AnchorManager.IGNORE_COLUMN);
      searchTaskAnchor.setRemovalStrategy(RemovalStrategy.SHIFT);
    } else {
      document.getAnchorManager().moveAnchor(searchTaskAnchor, startAnchorLine.line(),
          startAnchorLine.number(), AnchorManager.IGNORE_COLUMN);
    }
  }

  private void dispatchSearchBegin() {
    if (progressListener != null) {
View Full Code Here

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

    @Override
    public boolean run(int workAmount) {
      LineInfo lineInfo = searchTaskAnchor.getLineInfo();

      for (; lineInfo.line() != stopLineAnchor.getLine() && workAmount > 0; workAmount--) {
        if (!executor.onSearchLine(lineInfo.line(), lineInfo.number(), false)) {
          dispatchSearchDone();
          return false;
        }

        if (!lineInfo.moveTo(searchDirectionHelper.isGoingDown())) {
View Full Code Here

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

        dispatchSearchDone();
        return false;
      }

      document.getAnchorManager().moveAnchor(
          searchTaskAnchor, lineInfo.line(), lineInfo.number(), AnchorManager.IGNORE_COLUMN);
      dispatchSearchProgress();
      return true;
    }
  }
}
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.