void (ActionEvent e) { final TreeClassChooserFactory factory = TreeClassChooserFactory.getInstance(myProject); PsiFile formFile = null; if (myTextField.getText().length() > 0) { VirtualFile formVFile = ResourceFileUtil.findResourceFileInScope(myTextField.getText(), myProject, ProjectScope.getAllScope(myProject)); if (formVFile != null) { formFile = PsiManager.getInstance(myProject).findFile(formVFile); } } TreeFileChooser fileChooser = factory.createFileChooser(myTitle, formFile, null, myFilter, true, true); fileChooser.showDialog(); PsiFile file = fileChooser.getSelectedFile(); if (file != null) { myTextField.setText(FormEditingUtil.buildResourceName(file)); } }