Kotlin Facet: Suppress bogus warning about language/api version

#KT-17848 Fixed
This commit is contained in:
Alexey Sedunov
2017-05-17 13:11:20 +03:00
parent 0994474e87
commit 8f6f69db65
2 changed files with 14 additions and 9 deletions
@@ -131,6 +131,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable, Co
this.k2jvmCompilerArguments = k2jvmCompilerArguments; this.k2jvmCompilerArguments = k2jvmCompilerArguments;
this.isProjectSettings = isProjectSettings; this.isProjectSettings = isProjectSettings;
if (isProjectSettings) {
languageVersionComboBox.addActionListener( languageVersionComboBox.addActionListener(
new ActionListener() { new ActionListener() {
@Override @Override
@@ -139,6 +140,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable, Co
} }
} }
); );
}
additionalArgsOptionsField.attachLabel(additionalArgsLabel); additionalArgsOptionsField.attachLabel(additionalArgsLabel);
@@ -298,7 +300,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable, Co
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private void restrictAPIVersions() { public void restrictAPIVersions() {
ApiVersion selectedAPIVersion = getSelectedAPIVersion(); ApiVersion selectedAPIVersion = getSelectedAPIVersion();
final LanguageVersion selectedLanguageVersion = getSelectedLanguageVersion(); final LanguageVersion selectedLanguageVersion = getSelectedLanguageVersion();
List<ApiVersion> permittedAPIVersions = ArraysKt.mapNotNull( List<ApiVersion> permittedAPIVersions = ArraysKt.mapNotNull(
@@ -246,7 +246,10 @@ class KotlinFacetEditorGeneralTab(
outputDirectory.textField.validateOnChange() outputDirectory.textField.validateOnChange()
copyRuntimeFilesCheckBox.validateOnChange() copyRuntimeFilesCheckBox.validateOnChange()
moduleKindComboBox.validateOnChange() moduleKindComboBox.validateOnChange()
languageVersionComboBox.validateOnChange() languageVersionComboBox.addActionListener {
restrictAPIVersions()
doValidate()
}
apiVersionComboBox.validateOnChange() apiVersionComboBox.validateOnChange()
coroutineSupportComboBox.validateOnChange() coroutineSupportComboBox.validateOnChange()
} }