private void setInlays() {
    if (myInlaysSet) return;
    myInlaysSet = true;
    myInlaysAbove.clear();
    myInlaysBelow.clear();
    setNextLocation();
    List<Inlay<?>> inlays = myEditor.getInlayModel()
      .getBlockElementsInRange(myLocation.offset, myNextLocation.atEnd() ? myDocument.getTextLength() : myNextLocation.offset - 1);
    for (Inlay<?> inlay : inlays) {
      int inlayOffset = inlay.getOffset() - (inlay.isRelatedToPrecedingText() ? 0 : 1);
      int foldIndex = myLocation.foldRegion;
      while (foldIndex < myFoldRegions.length && myFoldRegions[foldIndex].getEndOffset() <= inlayOffset) foldIndex++;
      if (foldIndex < myFoldRegions.length && myFoldRegions[foldIndex].getStartOffset() <= inlayOffset && !showWhenFolded(inlay)) continue;
      (inlay.getPlacement() == Inlay.Placement.ABOVE_LINE ? myInlaysAbove : myInlaysBelow).add(inlay);
    }
  }
private void setInlays()