@NotNull public LogicalPosition adjustLogicalPosition(LogicalPosition defaultLogical, int offset) { if (myBulkUpdateInProgress || myUpdateInProgress || !prepareToMapping()) { return defaultLogical; } myActive++; try { myOffsetToLogicalTask.input = offset; executeSafely(myOffsetToLogicalTask); return myOffsetToLogicalTask.output; } finally { myActive--; } }
@NotNull @Override public LogicalPosition offsetToLogicalPosition(int offset) { if (myBulkUpdateInProgress || myUpdateInProgress || !prepareToMapping()) { return myEditor.offsetToLogicalPosition(offset, false); } myActive++; try { myOffsetToLogicalTask.input = offset; executeSafely(myOffsetToLogicalTask); return myOffsetToLogicalTask.output; } finally { myActive--; } }