static int getLineNumber(@NotNull EditorMouseEvent event) {
    Editor editor = event.getEditor();
    if (event.getVisualPosition().line >= ((EditorImpl)editor).getVisibleLineCount()) {
      return -1;
    }
    int lineStartOffset = EditorUtil.getNotFoldedLineStartOffset(editor, event.getOffset());
    int documentLine = editor.getDocument().getLineNumber(lineStartOffset);
    return documentLine < editor.getDocument().getLineCount() ? documentLine : -1;
  }
static int getLineNumber(@NotNull EditorMouseEvent event)