Result (Expression @NotNull [] params, ExpressionContext context) { final int offset = context.getStartOffset(); int line = context.getEditor().offsetToLogicalPosition(offset).line + 1; return new TextResult(String.valueOf(line)); }