void () { CollectionComboBoxModel<VersionItem> versionSelectorModel = new CollectionComboBoxModel<>(); versionSelectorModel.add(VersionItem.LatestRelease.INSTANCE); versionSelectorModel.add(VersionItem.LatestVersion.INSTANCE); versionSelectorModel.add(ContainerUtil.map(versions, VersionItem.ExactVersion::new)); versionSelector.setModel(versionSelectorModel); versionSelector.setSelectedItem(toVersionItem(model.getVersion())); setState(State.Loaded); versionSelector.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { model.setVersion(getSelectedVersion()); onChangeListener.onChange(RepositoryLibraryPropertiesEditor.this); updateManageDependenciesLink(); } }); downloadSourcesCheckBox.setSelected(model.isDownloadSources()); downloadSourcesCheckBox.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { model.setDownloadSources(downloadSourcesCheckBox.isSelected()); onChangeListener.onChange(RepositoryLibraryPropertiesEditor.this); } }); downloadJavaDocsCheckBox.setSelected(model.isDownloadJavaDocs()); downloadJavaDocsCheckBox.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { model.setDownloadJavaDocs(downloadJavaDocsCheckBox.isSelected()); onChangeListener.onChange(RepositoryLibraryPropertiesEditor.this); } }); downloadAnnotationsCheckBox.setSelected(model.isDownloadAnnotations()); downloadAnnotationsCheckBox.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { model.setDownloadAnnotations(downloadAnnotationsCheckBox.isSelected()); onChangeListener.onChange(RepositoryLibraryPropertiesEditor.this); } }); updateIncludeTransitiveDepsCheckBoxState(); myIncludeTransitiveDepsCheckBox.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { updateManageDependenciesLink(); ThreeStateCheckBox.State state = myIncludeTransitiveDepsCheckBox.getState(); if (state != ThreeStateCheckBox.State.DONT_CARE) { model.setExcludedDependencies(Collections.emptyList()); } model.setIncludeTransitiveDependencies(state != ThreeStateCheckBox.State.NOT_SELECTED); onChangeListener.onChange(RepositoryLibraryPropertiesEditor.this); } }); updateManageDependenciesLink(); }