Package com.google.collide.shared.document

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


         * at the end of a word on the line. If this line ends in a* {@code \n}
         * that will cause us to move to the next line when we check
         * {@link LineUtils#getLastCursorColumn} which isn't what we want. So
         * fix it now in case the lines ends in {@code \n}.
         */
        if (column == lineInfo.line().length()) {
          column = rubberbandColumn(lineInfo.line(), column);
        }
        break;

      case UP:
View Full Code Here


         * that will cause us to move to the next line when we check
         * {@link LineUtils#getLastCursorColumn} which isn't what we want. So
         * fix it now in case the lines ends in {@code \n}.
         */
        if (column == lineInfo.line().length()) {
          column = rubberbandColumn(lineInfo.line(), column);
        }
        break;

      case UP:
        column = preferredCursorColumn;
View Full Code Here

        }
        break;

      case UP:
        column = preferredCursorColumn;
        if (lineInfo.line() == document.getFirstLine() && (isShiftHeld || UserAgent.isMac())) {
          /*
           * Pressing up on the first line should:
           * - On Mac, always go to first column, or
           * - On all platforms, shift+up should select to first column
           */
 
View Full Code Here

          column = 0;
        } else {
          lineInfo.moveToPrevious();
        }

        column = rubberbandColumn(lineInfo.line(), column);
        shouldUpdatePreferredColumn = false;
        break;

      case DOWN:
        column = preferredCursorColumn;
View Full Code Here

        shouldUpdatePreferredColumn = false;
        break;

      case DOWN:
        column = preferredCursorColumn;
        if (lineInfo.line() == document.getLastLine() && (isShiftHeld || UserAgent.isMac())) {
          // Consistent with up-arrowing on first line
          column = LineUtils.getLastCursorColumn(lineInfo.line());
        } else {
          lineInfo.moveToNext();
        }
View Full Code Here

      case DOWN:
        column = preferredCursorColumn;
        if (lineInfo.line() == document.getLastLine() && (isShiftHeld || UserAgent.isMac())) {
          // Consistent with up-arrowing on first line
          column = LineUtils.getLastCursorColumn(lineInfo.line());
        } else {
          lineInfo.moveToNext();
        }

        column = rubberbandColumn(lineInfo.line(), column);
View Full Code Here

          column = LineUtils.getLastCursorColumn(lineInfo.line());
        } else {
          lineInfo.moveToNext();
        }

        column = rubberbandColumn(lineInfo.line(), column);
        shouldUpdatePreferredColumn = false;
        break;

      case PAGE_UP:
        for (int i = buffer.getFlooredHeightInLines(); i > 0; i--) {
View Full Code Here

      case PAGE_UP:
        for (int i = buffer.getFlooredHeightInLines(); i > 0; i--) {
          lineInfo.moveToPrevious();
        }
        column = rubberbandColumn(lineInfo.line(), preferredCursorColumn);
        shouldUpdatePreferredColumn = false;
        break;

      case PAGE_DOWN:
        for (int i = buffer.getFlooredHeightInLines(); i > 0; i--) {
View Full Code Here

      case PAGE_DOWN:
        for (int i = buffer.getFlooredHeightInLines(); i > 0; i--) {
          lineInfo.moveToNext();
        }
        column = rubberbandColumn(lineInfo.line(), preferredCursorColumn);
        shouldUpdatePreferredColumn = false;
        break;

      case LINE_START:
        int firstNonWhitespaceColumn = TextUtils.countWhitespacesAtTheBeginningOfLine(
View Full Code Here

        shouldUpdatePreferredColumn = false;
        break;

      case LINE_START:
        int firstNonWhitespaceColumn = TextUtils.countWhitespacesAtTheBeginningOfLine(
            lineInfo.line().getText());
        column = (column != firstNonWhitespaceColumn) ? firstNonWhitespaceColumn : 0;
        break;

      case LINE_END:
        column = LineUtils.getLastCursorColumn(lineInfo.line());
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.