void (List<PsiClass> classes, Editor editor) { final Project project = classes.get(0).getProject(); PsiClassListCellRenderer renderer = new PsiClassListCellRenderer(); final IPopupChooserBuilder<PsiClass> builder = JBPopupFactory.getInstance() .createPopupChooserBuilder(classes) .setRenderer(renderer) .setSelectionMode(ListSelectionModel.SINGLE_SELECTION) .setItemChosenCallback((aClass) -> CommandProcessor.getInstance() .executeCommand(project, () -> ApplicationManager.getApplication().runWriteAction(() -> invokeImpl(project, aClass)), getText(), null)) .setTitle(QuickFixBundle.message("target.class.chooser.title")); renderer.installSpeedSearch(builder); builder.createPopup().showInBestPositionFor(editor); }