void () { TreeClassChooser chooser = TreeClassChooserFactory.getInstance(myProject).createNoInnerClassesScopeChooser( JavaBundle.message("class.filter.editor.choose.class.title"), GlobalSearchScope.allScope(myProject), myChooserFilter, null); chooser.showDialog(); PsiClass selectedClass = chooser.getSelected(); if (selectedClass != null) { com.intellij.ui.classFilter.ClassFilter filter = createFilter(getJvmClassName(selectedClass)); myTableModel.addRow(filter); int row = myTableModel.getRowCount() - 1; myTable.getSelectionModel().setSelectionInterval(row, row); myTable.scrollRectToVisible(myTable.getCellRect(row, 0, true)); IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(myTable, true)); } }