public static boolean checkLineMoverAvailable(@NotNull Editor editor, @NotNull MoveInfo info, boolean down) {
    LineRange range = StatementUpDownMover.getLineRangeFromSelection(editor);

    LogicalPosition maxLinePos = editor.offsetToLogicalPosition(editor.getDocument().getTextLength());
    int maxLine = maxLinePos.column == 0 ? maxLinePos.line : maxLinePos.line + 1;
    if (range.startLine == 0 && !down) return false;
    if (range.endLine >= maxLine && down) return false;

    int nearLine = down ? range.endLine : range.startLine - 1;
    info.toMove = range;
    info.toMove2 = new LineRange(nearLine, nearLine + 1);

    return true;
  }
public static boolean checkLineMoverAvailable(@NotNull Editor editor, @NotNull MoveInfo info, boolean down)