void () { FileChooserDescriptor fileChooserDescriptor = myFileChooserDescriptor; if (myTitle != null || myDescription != null) { fileChooserDescriptor = (FileChooserDescriptor)myFileChooserDescriptor.clone(); if (myTitle != null) { fileChooserDescriptor.setTitle(myTitle); } if (myDescription != null) { fileChooserDescriptor.setDescription(myDescription); } } FileChooser.chooseFile(fileChooserDescriptor, getProject(), myTextComponent, getInitialFile(), this::onFileChosen); }