void (@Nullable VirtualFile toSelect) { VirtualFile file = FileChooserUtil.getFileToSelect(myChooserDescriptor, myProject, toSelect); if (file != null && file.isValid()) { myPathTextField.setText(VfsUtil.getReadableUrl(file), true, () -> selectInTree(new VirtualFile[]{file}, false, false)); } }