void (ActionEvent e) { PsiClass currentClass = getSelectedClass(); TreeClassChooser chooser = TreeClassChooserFactory.getInstance(myProject).createAllProjectScopeChooser( JavaDebuggerBundle.message("add.field.breakpoint.dialog.classchooser.title")); if (currentClass != null) { PsiFile containingFile = currentClass.getContainingFile(); if (containingFile != null) { PsiDirectory containingDirectory = containingFile.getContainingDirectory(); if (containingDirectory != null) { chooser.selectDirectory(containingDirectory); } } } chooser.showDialog(); PsiClass selectedClass = chooser.getSelected(); if (selectedClass != null) { myClassChooser.setText(selectedClass.getQualifiedName()); } }