@NotNull public TextRange getVcsTextRange(@NotNull Range range) { synchronized (myLock) { if (!range.isValid()) { LOG.warn("Vcs TextRange of invalid range"); } return DiffUtil.getLinesRange(myVcsDocument, range.getVcsLine1(), range.getVcsLine2()); } }
@NotNull public TextRange getCurrentTextRange(@NotNull Range range) { myApplication.assertReadAccessAllowed(); synchronized (myLock) { if (!range.isValid()) { LOG.warn("Current TextRange of invalid range"); } return DiffUtil.getLinesRange(myDocument, range.getLine1(), range.getLine2()); } }
public void rollbackChanges(@NotNull Range range) { myApplication.assertWriteAccessAllowed(); synchronized (myLock) { if (myBulkUpdate) return; if (!range.isValid()) { LOG.warn("Rollback of invalid range"); return; } doRollbackRange(range); } }