mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] Do not limit language versions when compiler is not accessible
#KTIJ-29106 Fixed GitOrigin-RevId: 953706482daecdbbf2f424fd38bc7d4097235b88
This commit is contained in:
committed by
intellij-monorepo-bot
parent
914d16b526
commit
de3d8ffd79
+15
-5
@@ -152,8 +152,10 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
||||
warningLabel.setIcon(AllIcons.General.WarningDialog);
|
||||
|
||||
additionalArgsOptionsField.attachLabel(additionalArgsLabel);
|
||||
kotlinJpsPluginVersionComboBox.addActionListener(
|
||||
e -> onLanguageLevelChanged(getSelectedKotlinJpsPluginVersionView()));
|
||||
if (isJpsCompilerVisible()) {
|
||||
kotlinJpsPluginVersionComboBox.addActionListener(
|
||||
e -> onLanguageLevelChanged(getSelectedKotlinJpsPluginVersionView()));
|
||||
}
|
||||
|
||||
fillVersions();
|
||||
|
||||
@@ -373,14 +375,18 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
||||
}
|
||||
|
||||
apiVersionComboBox.setModel(new MutableCollectionComboBoxModel<>(permittedAPIVersions));
|
||||
languageVersionComboBox.setModel(new MutableCollectionComboBoxModel<>(permittedAPIVersions));
|
||||
if (isJpsCompilerVisible()) {
|
||||
languageVersionComboBox.setModel(new MutableCollectionComboBoxModel<>(permittedAPIVersions));
|
||||
}
|
||||
|
||||
VersionView selectedItem =
|
||||
VersionComparatorUtil.compare(selectedAPIVersion.getVersionString(), upperBound.getVersionString()) <= 0
|
||||
? selectedAPIView
|
||||
: upperBoundView;
|
||||
apiVersionComboBox.setSelectedItem(selectedItem);
|
||||
languageVersionComboBox.setSelectedItem(selectedItem);
|
||||
if (isJpsCompilerVisible()) {
|
||||
languageVersionComboBox.setSelectedItem(selectedItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void fillJvmVersionList() {
|
||||
@@ -432,8 +438,12 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
||||
});
|
||||
}
|
||||
|
||||
private boolean isJpsCompilerVisible() {
|
||||
return isProjectSettings && jpsPluginSettings != null;
|
||||
}
|
||||
|
||||
private void fillVersions() {
|
||||
if (isProjectSettings && jpsPluginSettings != null) {
|
||||
if (isJpsCompilerVisible()) {
|
||||
defaultJpsVersionItem = JpsVersionItem.createFromRawVersion(
|
||||
KotlinJpsPluginSettingsKt.getVersionWithFallback(jpsPluginSettings)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user