void (ActionEvent e ) { final VirtualFile fileToSelect = getFileToSelect(); myChooserDescriptor.setTitle(myTitle); // important to set title and description here because a shared descriptor instance can be used myChooserDescriptor.setDescription(myDescription); FileChooser.chooseFiles(myChooserDescriptor, null, fileToSelect, files -> doSetText(FileUtil.toSystemDependentName(files.get(0).getPath()))); }