private void updateSourcesAndJavadocCheckboxes() {
    final FrameworkLibraryVersion version = getSelectedVersion();
    boolean sourcesCheckboxEnabled;
    boolean javadocCheckboxEnabled;
    if (version == null) {
      sourcesCheckboxEnabled = javadocCheckboxEnabled = false;
    }
    else {
      final List<DownloadableLibraryFileDescription> descriptions = getSelectedDownloads(version);
      sourcesCheckboxEnabled = haveAdditionalDownloads(descriptions, AdditionalDownloadType.SOURCES);
      javadocCheckboxEnabled = haveAdditionalDownloads(descriptions, AdditionalDownloadType.DOCUMENTATION);
    }
    setEnabled(myDownloadSourcesCheckBox, sourcesCheckboxEnabled);
    setEnabled(myDownloadJavadocsCheckBox, javadocCheckboxEnabled);
  }
private void updateSourcesAndJavadocCheckboxes()