void (final @NotNull List<? extends PsiClass> targets, final @NotNull Consumer<? super List<? extends PsiClass>> selectionConsumer) { new ChooseClassAndDoHighlightRunnable(myClassTypes, myEditor, JavaBundle.message("highlight.exceptions.thrown.chooser.title")) { @Override protected void selected(PsiClass @NotNull ... classes) { selectionConsumer.consume(Arrays.asList(classes)); } }.run(); }