Iterable<Crumb> (@NotNull VirtualFile file, @NotNull Document document, int offset, Boolean forcedShown) { BreadcrumbsProvider defaultInfoProvider = findProvider(file, myProject, forcedShown); Collection<Pair<PsiElement, BreadcrumbsProvider>> pairs = getLineElements(document, offset, file, myProject, defaultInfoProvider, true); if (pairs == null) return Collections.emptyList(); ArrayList<Crumb> result = new ArrayList<>(pairs.size()); CrumbPresentation[] presentations = getCrumbPresentations(toPsiElementArray(pairs)); int index = 0; for (Pair<PsiElement, BreadcrumbsProvider> pair : pairs) { CrumbPresentation presentation = null; if (presentations != null && 0 <= index && index < presentations.length) { presentation = presentations[index++]; } result.add(new PsiCrumb(pair.first, pair.second, presentation)); } return result; }