JScrollPane (@NotNull Set<? extends SimilarUsage> usagesToRender) { JScrollPane similarUsagesScrollPane = ScrollPaneFactory.createScrollPane(this, true); renderOriginalUsage(); BoundedRangeModelThresholdListener.install(similarUsagesScrollPane.getVerticalScrollBar(), () -> { if (myAlreadyProcessedUsages < usagesToRender.size()) { renderSimilarUsages(usagesToRender); SimilarUsagesCollector.logMoreUsagesLoaded(myOriginalUsage.getProject(), myUsageView, myAlreadyRenderedUsages); } return Unit.INSTANCE; }); return similarUsagesScrollPane; }