void (PsiClass[] scopes, final Consumer<? super PsiClass> callback, Editor editor) { PsiElementProcessor<PsiClass> processor = new PsiElementProcessor<>() { @Override public boolean execute(@NotNull PsiClass element) { callback.accept(element); return false; } }; NavigationUtil.getPsiElementPopup(scopes, new PsiClassListCellRenderer(), JavaRefactoringBundle.message("popup.title.choose.class.to.introduce.field"), processor).showInBestPositionFor(editor); }