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,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()
}