LineRange (@NotNull DocumentEvent e) { int line1 = e.getDocument().getLineNumber(e.getOffset()); int line2 = e.getDocument().getLineNumber(e.getOffset() + e.getOldLength()) + 1; return new LineRange(line1, line2); }