private void chooseDirectoryAndAdd(final @Nullable FrameworkType type) {
    final FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
    descriptor.setDescription(LangBundle.message("label.will.be.disabled.in.selected.directory",
                                                 type != null ? LangBundle.message("label.framework.detection", type.getPresentableName())
                                                              : LangBundle.message("label.detection.for.all.frameworks")));
    final VirtualFile[] files = FileChooser.chooseFiles(descriptor, myMainPanel, myProject, myProject.getBaseDir());
    final VirtualFile file = files.length > 0 ? files[0] : null;
    if (file != null) {
      addAndRemoveDuplicates(type, file);
    }
  }
private void chooseDirectoryAndAdd(final @Nullable FrameworkType type)