private void onVersionChanged(final @Nullable List<? extends DownloadableLibraryFileDescription> selectedFiles) {
    final FrameworkLibraryVersion version = getSelectedVersion();
    if (Comparing.equal(myLastSelectedVersion, version)) return;

    if (version != null) {
      final List<? extends DownloadableLibraryFileDescription> downloads = version.getFiles();
      myFilesList.setModel(new CollectionListModel<>(
        ContainerUtil.map2Array(downloads, JCheckBox.class, (Function<DownloadableLibraryFileDescription, JCheckBox>)description -> {
          final boolean selected = selectedFiles != null ? selectedFiles.contains(description) : !description.isOptional();
          @NlsSafe final String name = description.getPresentableFileName();
          return new JCheckBox(name, selected);
        })));
      if (myNameAndLevelPanel != null) {
        myNameAndLevelPanel.setDefaultName(version.getDefaultLibraryName());
      }
    }
    updateSourcesAndJavadocCheckboxes();
    myLastSelectedVersion = version;
  }
private void onVersionChanged(final @Nullable List<? extends DownloadableLibraryFileDescription> selectedFiles)