Kotlin Facet: Suppress bogus warning about language/api version
#KT-17848 Fixed
This commit is contained in:
+10
-8
@@ -131,14 +131,16 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable, Co
|
||||
this.k2jvmCompilerArguments = k2jvmCompilerArguments;
|
||||
this.isProjectSettings = isProjectSettings;
|
||||
|
||||
languageVersionComboBox.addActionListener(
|
||||
new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
restrictAPIVersions();
|
||||
if (isProjectSettings) {
|
||||
languageVersionComboBox.addActionListener(
|
||||
new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
restrictAPIVersions();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
additionalArgsOptionsField.attachLabel(additionalArgsLabel);
|
||||
|
||||
@@ -298,7 +300,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable, Co
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void restrictAPIVersions() {
|
||||
public void restrictAPIVersions() {
|
||||
ApiVersion selectedAPIVersion = getSelectedAPIVersion();
|
||||
final LanguageVersion selectedLanguageVersion = getSelectedLanguageVersion();
|
||||
List<ApiVersion> permittedAPIVersions = ArraysKt.mapNotNull(
|
||||
|
||||
@@ -246,7 +246,10 @@ class KotlinFacetEditorGeneralTab(
|
||||
outputDirectory.textField.validateOnChange()
|
||||
copyRuntimeFilesCheckBox.validateOnChange()
|
||||
moduleKindComboBox.validateOnChange()
|
||||
languageVersionComboBox.validateOnChange()
|
||||
languageVersionComboBox.addActionListener {
|
||||
restrictAPIVersions()
|
||||
doValidate()
|
||||
}
|
||||
apiVersionComboBox.validateOnChange()
|
||||
coroutineSupportComboBox.validateOnChange()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user