NavigationGutterIconRenderer (@NotNull Project project, @Nullable GutterIconNavigationHandler<PsiElement> navigationHandler) { checkBuilt(); NotNullFactory<Collection<? extends T>> factory = evaluateAndForget(myTargets); NotNullLazyValue<List<SmartPsiElementPointer<?>>> pointers = createPointersThunk(myLazy, project, factory, myConverter); final boolean empty = isEmpty(); boolean newUI = ExperimentalUI.isNewUI() && !ApplicationManager.getApplication().isUnitTestMode(); if (myTooltipText == null && !myLazy) { final SortedSet<String> names = new TreeSet<>(); for (T t : myTargets.getValue()) { final String text = myNamer.fun(t); if (text != null) { names.add(newUI ? text : MessageFormat.format(PATTERN, text)); } } @Nls StringBuilder sb = new StringBuilder("<html><body>"); if (myTooltipTitle != null) { sb.append(myTooltipTitle).append("<br>"); } for (String name : names) { sb.append(name).append("<br>"); } sb.append("</body></html>"); myTooltipText = sb.toString(); } Computable<PsiElementListCellRenderer<?>> renderer = myCellRenderer == null ? DefaultPsiElementCellRenderer::new : myCellRenderer; NavigationGutterIconRenderer gutterIconRenderer = createGutterIconRenderer(pointers, renderer, empty, navigationHandler); gutterIconRenderer.setProject(project); gutterIconRenderer.setTargetRenderer(myTargetRenderer); return gutterIconRenderer; }