private static <T extends DomElement> @NotNull RelatedItemLineMarkerInfo<PsiElement>
  createPluginLineMarkerInfo(@NotNull List<? extends PointableCandidate> targets,
                             @NotNull PsiElement element,
                             @Nls(capitalization = Nls.Capitalization.Title) String popup,
                             NullableFunction<T, @NlsSafe String> namer) {
    return NavigationGutterIconBuilder
      .create(DevKitIcons.Gutter.Plugin, CONVERTER, target -> {
        DomElement domElement = DomUtil.getDomElement(target.pointer.getElement());
        return Collections.singletonList(new DomGotoRelatedItem(domElement, "DevKit") {
          @Override
          public String getCustomName() {
            //noinspection unchecked
            return getDomElementName((T)domElement, namer);
          }

          @Nls
          @Override
          public @Nullable String getCustomContainerName() {
            PsiElement psiElement = getElement();
            if (psiElement == null) return null;
            return UniqueVFilePathBuilder.getInstance()
              .getUniqueVirtualFilePath(psiElement.getProject(), psiElement.getContainingFile().getVirtualFile());
          }
        });
      })
      .setTargets(targets)
      .setPopupTitle(popup)
      .setNamer(candidate -> {
        DomElement domElement = DomUtil.getDomElement(candidate.pointer.getElement());
        //noinspection unchecked
        return getDomElementName((T)domElement, namer);
      })
      .setTargetRenderer(() -> new PsiTargetPresentationRenderer<>() {
        @Nls
        @NotNull
        @Override
        public String getElementText(@NotNull PsiElement element) {
          DomElement domElement = DomUtil.getDomElement(element);
          //noinspection unchecked
          return getDomElementName((T)domElement, namer);
        }

        @Nls
        @Override
        public String getContainerText(@NotNull PsiElement element) {
          return UniqueVFilePathBuilder.getInstance()
            .getUniqueVirtualFilePath(element.getProject(), element.getContainingFile().getVirtualFile());
        }

        @Nullable
        @Override
        protected Icon getIcon(@NotNull PsiElement element) {
          DomElement domElement = DomUtil.getDomElement(element);
          assert domElement != null;
          return ObjectUtils.chooseNotNull(domElement.getPresentation().getIcon(), element.getIcon(0));
        }
      })
      .setAlignment(GutterIconRenderer.Alignment.RIGHT)
      .createLineMarkerInfo(element);
  }
private static <T extends DomElement> @NotNull RelatedItemLineMarkerInfo<PsiElement>
  createPluginLineMarkerInfo(@NotNull List<? extends PointableCandidate> targets,
                             @NotNull PsiElement element,
                             @Nls(capitalization = Nls.Capitalization.Title) String popup,
                             NullableFunction<T, @NlsSafe String> namer)