void (@NotNull Project project) { DefaultPsiElementListCellRenderer renderer = new DefaultPsiElementListCellRenderer(); final Editor editor = CommonDataKeys.EDITOR.getData(DataManager.getInstance().getDataContext()); if (editor != null) { final IPopupChooserBuilder<PsiFile> builder = JBPopupFactory.getInstance() .createPopupChooserBuilder(List.of(myPsiFiles)) .setRenderer(renderer) .setTitle(ExecutionBundle.message("choose.file")) .setItemsChosenCallback((selectedElements) -> { for (PsiFile element : selectedElements) { Navigatable descriptor = EditSourceUtil.getDescriptor(element); if (descriptor != null && descriptor.canNavigate()) { descriptor.navigate(true); } } }); renderer.installSpeedSearch(builder); builder.createPopup().showInBestPositionFor(editor); } }