void (ActionEvent actionEvent) { final FileChooserDescriptor fileChooserDescriptor = new FileChooserDescriptor(true, false, false, false, false, multipleFileSelection) { private final List<String> extensions = Arrays.asList(_extensions); @Override public boolean isFileSelectable(@Nullable VirtualFile virtualFile) { if (virtualFile == null) return false; return extensions.contains(virtualFile.getExtension()); } @Override public boolean isFileVisible(VirtualFile file, boolean showHiddenFiles) { return super.isFileVisible(file, showHiddenFiles) && (file.isDirectory() || isFileSelectable(file)); } }; fileChooserDescriptor.setTitle(selectFileDialogTitle); VirtualFile initialFile = ProjectUtil.guessProjectDir(myProject); String selectedItem = wsdlUrl.getTextField().getText(); if (selectedItem != null && selectedItem.startsWith(LocalFileSystem.PROTOCOL_PREFIX)) { VirtualFile fileByPath = VfsUtilCore .findRelativeFile(ExternalResourceManager.getInstance().getResourceLocation(VfsUtilCore.fixURLforIDEA(selectedItem)), null); if (fileByPath != null) initialFile = fileByPath; } final VirtualFile[] virtualFiles = FileChooser.chooseFiles(fileChooserDescriptor, myProject, initialFile); if (virtualFiles.length == 1) { String url = VfsUtilCore.fixIDEAUrl(virtualFiles[0].getUrl()); wsdlUrl.setText(url); } }