private void fillVersions() {
        if (isJpsCompilerVisible()) {
            defaultJpsVersionItem = JpsVersionItem.createFromRawVersion(
                    KotlinJpsPluginSettingsKt.getVersionWithFallback(jpsPluginSettings)
            );

            kotlinJpsPluginVersionComboBox.addItem(defaultJpsVersionItem);

            IdeKotlinVersion bundledVersion = KotlinJpsPluginSettings.getBundledVersion();
            IdeKotlinVersion defaultVersion = defaultJpsVersionItem.getVersion();
            Integer compare = defaultVersion != null ? defaultVersion.compareTo(bundledVersion) : null;
            if (compare == null || compare > 0) {
                jpsPluginComboBoxModel.add(new JpsVersionItem(bundledVersion));
            } else if (compare < 0) {
                jpsPluginComboBoxModel.add(0, new JpsVersionItem(bundledVersion));
            }

            JpsVersionItem loadingItem = JpsVersionItem.createLabel(KotlinBaseCompilerConfigurationUiBundle.message("loading.available.versions.from.maven"));
            kotlinJpsPluginVersionComboBox.addItem(loadingItem);
            PopupMenuListenerAdapter popupListener = new PopupMenuListenerAdapter() {
                @Override
                public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
                    kotlinJpsPluginVersionComboBox.removePopupMenuListener(this);
                    fetchAvailableJpsCompilersAsync(
                            availableVersions -> {
                                kotlinJpsPluginVersionComboBox.removeItem(loadingItem);
                                if (availableVersions == null) {
                                    kotlinJpsPluginVersionComboBox.addItem(
                                            JpsVersionItem.createLabel(
                                                    KotlinBaseCompilerConfigurationUiBundle.message("failed.fetching.all.available.versions.from.maven")
                                            )
                                    );
                                } else {
                                    SortedSet<IdeKotlinVersion> newItems = new TreeSet<>(availableVersions);
                                    for (JpsVersionItem item : jpsPluginComboBoxModel.getItems()) {
                                        IdeKotlinVersion ideKotlinVersion = item.getVersion();
                                        if (ideKotlinVersion != null) {
                                            newItems.add(ideKotlinVersion);
                                        }
                                    }

                                    Object selectedItem = jpsPluginComboBoxModel.getSelectedItem();
                                    jpsPluginComboBoxModel.update(
                                            ContainerUtil.reverse(ContainerUtil.map(newItems, it -> new JpsVersionItem(it))));
                                    kotlinJpsPluginVersionComboBox.setSelectedItem(selectedItem);
                                }

                                if (kotlinJpsPluginVersionComboBox.isPopupVisible()) {
                                    kotlinJpsPluginVersionComboBox.hidePopup();
                                    kotlinJpsPluginVersionComboBox.showPopup();
                                }
                            });
                }
            };

            kotlinJpsPluginVersionComboBox.addPopupMenuListener(popupListener);
        } else {
            kotlinJpsPluginVersionPanel.setVisible(false);
        }

        VersionView latestStable = getLatestStableVersion();
        int index = 0;
        EnumEntries<LanguageVersion> languageVersions = LanguageVersion.getEntries();
        int latestStableIndex = languageVersions.size();
        for (LanguageVersion languageVersion : languageVersions) {
            if (index > latestStableIndex) break;
            if (!isLessOrEqual(languageVersion, latestStable.getVersion()) && (index < latestStableIndex)) {
                latestStableIndex = index;
            }

            if (!LanguageVersionSettingsKt.isStableOrReadyForPreview(languageVersion)) {
                continue;
            }

            ApiVersion apiVersion = ApiVersion.createByLanguageVersion(languageVersion);

            if (!apiVersion.isUnsupported()) {
                apiVersionComboBox.addItem(new VersionView.Specific(languageVersion));
            }
            if (!languageVersion.isUnsupported()) {
                languageVersionComboBox.addItem(new VersionView.Specific(languageVersion));
            }
            index++;
        }

        languageVersionComboBox.setRenderer(new DescriptionListCellRenderer());
        kotlinJpsPluginVersionComboBox.setRenderer(new DescriptionListCellRenderer());
        apiVersionComboBox.setRenderer(new DescriptionListCellRenderer());
    }
private void fillVersions()