void (TreeClassChooser chooser) { String s = getText(); PsiClass psiclass = findClass(s); if (psiclass == null) return; PsiDirectory psidirectory = psiclass.getContainingFile().getContainingDirectory(); if (psidirectory != null) chooser.selectDirectory(psidirectory); chooser.select(psiclass); }