void (@NotNull AnActionEvent e) { final ProjectStructureElement selected = getSelectedElement(); if (selected == null) return; final Collection<ProjectStructureElementUsage> usages = getContext().getDaemonAnalyzer().getUsages(selected); if (usages.isEmpty()) { Messages.showInfoMessage(myParentComponent, JavaUiBundle.message("find.usage.view.no.usages.text"), JavaUiBundle.message("find.pointcut.applications.not.found.title")); return; } RelativePoint point = getPointToShowResults(); final ProjectStructureElementUsage[] usagesArray = usages.toArray(new ProjectStructureElementUsage[0]); Arrays.sort(usagesArray, (o1, o2) -> o1.getPresentableName().compareToIgnoreCase(o2.getPresentableName())); BaseListPopupStep<ProjectStructureElementUsage> step = new BaseListPopupStep<>(JavaUiBundle.message("dependencies.used.in.popup.title"), usagesArray) { @Override public PopupStep onChosen(final ProjectStructureElementUsage selected, final boolean finalChoice) { PlaceInProjectStructure place = selected.getPlace(); if (place.canNavigate()) { place.navigate(); } return FINAL_CHOICE; } @NotNull @Override public String getTextFor(ProjectStructureElementUsage value) { return value.getPresentableName(); } @Override public Icon getIconFor(ProjectStructureElementUsage selection) { return selection.getIcon(); } @Override public boolean isSpeedSearchEnabled() { return true; } }; new ListPopupImpl(myProjectStructureConfigurable.getProject(), step) { @Override protected ListCellRenderer getListElementRenderer() { return new ListCellRendererWithRightAlignedComponent<ProjectStructureElementUsage>() { @Override protected void customize(ProjectStructureElementUsage value) { setLeftText(value.getPresentableName()); setIcon(value.getIcon()); setLeftForeground(value.getPlace().canNavigate() ? UIUtil.getLabelTextForeground() : UIUtil.getLabelDisabledForeground()); setRightForeground(JBColor.GRAY); setRightText(value.getPresentableLocationInElement()); } }; } }.show(point); }