void (@NotNull Project project, @Nullable Editor editor, PsiFile file) { if (myModules.size() == 1) { addDependencyOnModule(project, editor, ContainerUtil.getFirstItem(myModules)); } else { JBPopup popup = JBPopupFactory.getInstance() .createPopupChooserBuilder(new ArrayList<>(myModules)) .setRenderer(new ModuleListCellRenderer()) .setTitle(QuickFixBundle.message("orderEntry.fix.choose.module.to.add.dependency.on")) .setMovable(false) .setResizable(false) .setRequestFocus(true) .setItemChosenCallback(selectedValue -> { if (selectedValue != null) { addDependencyOnModule(project, editor, selectedValue); } }) .createPopup(); if (editor != null) { popup.showInBestPositionFor(editor); } else { popup.showCenteredInCurrentWindow(project); } } }