synchronized void updateQuickFixFields(@NotNull Document document,
                                         @NotNull Long2ObjectMap<RangeMarker> range2markerCache,
                                         long finalHighlighterRange) {
    if (quickFixActionMarkers != null && quickFixActionRanges != null && quickFixActionRanges.size() == quickFixActionMarkers.size() +1) {
      // markers already created, make quickFixRanges <-> quickFixMarkers consistent by adding new marker to the quickFixMarkers if necessary
      Pair<IntentionActionDescriptor, TextRange> last = ContainerUtil.getLastItem(quickFixActionRanges);
      Segment textRange = last.getSecond();
      if (textRange.getEndOffset() <= document.getTextLength()) {
        RangeMarker marker = getOrCreate(document, range2markerCache, TextRangeScalarUtil.toScalarRange(textRange));
        quickFixActionMarkers.add(Pair.create(last.getFirst(), marker));
      }
      return;
    }
    if (quickFixActionRanges != null && quickFixActionMarkers == null) {
      List<Pair<IntentionActionDescriptor, RangeMarker>> list = new ArrayList<>(quickFixActionRanges.size());
      for (Pair<IntentionActionDescriptor, TextRange> pair : quickFixActionRanges) {
        TextRange textRange = pair.second;
        if (textRange.getEndOffset() > document.getTextLength()) continue;
        RangeMarker marker = getOrCreate(document, range2markerCache, TextRangeScalarUtil.toScalarRange(textRange));
        list.add(Pair.create(pair.first, marker));
      }
      quickFixActionMarkers = ContainerUtil.createLockFreeCopyOnWriteList(list);
    }
    if (fixRange == finalHighlighterRange) {
      fixMarker = null; // null means it the same as highlighter's range
    }
    else if (TextRangeScalarUtil.endOffset(fixRange) <= document.getTextLength()) {
      fixMarker = getOrCreate(document, range2markerCache, fixRange);
    }
  }
synchronized void updateQuickFixFields(@NotNull Document document,
                                         @NotNull Long2ObjectMap<RangeMarker> range2markerCache,
                                         long finalHighlighterRange)