+1
-13
@@ -37,7 +37,6 @@ import org.jetbrains.kotlin.idea.PluginStartupComponent;
|
|||||||
import org.jetbrains.kotlin.idea.KotlinBundle;
|
import org.jetbrains.kotlin.idea.KotlinBundle;
|
||||||
import org.jetbrains.kotlin.idea.facet.DescriptionListCellRenderer;
|
import org.jetbrains.kotlin.idea.facet.DescriptionListCellRenderer;
|
||||||
import org.jetbrains.kotlin.idea.facet.KotlinFacet;
|
import org.jetbrains.kotlin.idea.facet.KotlinFacet;
|
||||||
import org.jetbrains.kotlin.idea.project.NewInferenceForIDEAnalysisComponent;
|
|
||||||
import org.jetbrains.kotlin.idea.roots.RootUtilsKt;
|
import org.jetbrains.kotlin.idea.roots.RootUtilsKt;
|
||||||
import org.jetbrains.kotlin.idea.util.CidrUtil;
|
import org.jetbrains.kotlin.idea.util.CidrUtil;
|
||||||
import org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt;
|
import org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt;
|
||||||
@@ -112,7 +111,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
private JLabel labelForSourceMapPrefix;
|
private JLabel labelForSourceMapPrefix;
|
||||||
private JComboBox sourceMapEmbedSources;
|
private JComboBox sourceMapEmbedSources;
|
||||||
private JPanel coroutinesPanel;
|
private JPanel coroutinesPanel;
|
||||||
private ThreeStateCheckBox enableNewInferenceInIDECheckBox;
|
|
||||||
private boolean isEnabled = true;
|
private boolean isEnabled = true;
|
||||||
|
|
||||||
public KotlinCompilerConfigurableTab(
|
public KotlinCompilerConfigurableTab(
|
||||||
@@ -153,7 +151,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
reportWarningsCheckBox.setThirdStateEnabled(isMultiEditor);
|
reportWarningsCheckBox.setThirdStateEnabled(isMultiEditor);
|
||||||
enableNewInferenceInIDECheckBox.setThirdStateEnabled(isMultiEditor);
|
|
||||||
|
|
||||||
if (isProjectSettings) {
|
if (isProjectSettings) {
|
||||||
List<String> modulesOverridingProjectSettings = ArraysKt.mapNotNull(
|
List<String> modulesOverridingProjectSettings = ArraysKt.mapNotNull(
|
||||||
@@ -211,7 +208,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
keepAliveCheckBox.setVisible(false);
|
keepAliveCheckBox.setVisible(false);
|
||||||
k2jvmPanel.setVisible(false);
|
k2jvmPanel.setVisible(false);
|
||||||
enableIncrementalCompilationForJsCheckBox.setVisible(false);
|
enableIncrementalCompilationForJsCheckBox.setVisible(false);
|
||||||
enableNewInferenceInIDECheckBox.setVisible(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateOutputDirEnabled();
|
updateOutputDirEnabled();
|
||||||
@@ -443,7 +439,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isModified() {
|
public boolean isModified() {
|
||||||
return isModified(reportWarningsCheckBox, !commonCompilerArguments.getSuppressWarnings()) ||
|
return isModified(reportWarningsCheckBox, !commonCompilerArguments.getSuppressWarnings()) ||
|
||||||
isModified(enableNewInferenceInIDECheckBox, NewInferenceForIDEAnalysisComponent.isEnabled(project)) ||
|
|
||||||
!getSelectedLanguageVersionView().equals(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments)) ||
|
!getSelectedLanguageVersionView().equals(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments)) ||
|
||||||
!getSelectedAPIVersionView().equals(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments)) ||
|
!getSelectedAPIVersionView().equals(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments)) ||
|
||||||
!getSelectedCoroutineState().equals(commonCompilerArguments.getCoroutinesState()) ||
|
!getSelectedCoroutineState().equals(commonCompilerArguments.getCoroutinesState()) ||
|
||||||
@@ -521,8 +516,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
!getSelectedLanguageVersionView().equals(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments)) ||
|
!getSelectedLanguageVersionView().equals(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments)) ||
|
||||||
!getSelectedAPIVersionView().equals(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments)) ||
|
!getSelectedAPIVersionView().equals(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments)) ||
|
||||||
!getSelectedCoroutineState().equals(commonCompilerArguments.getCoroutinesState()) ||
|
!getSelectedCoroutineState().equals(commonCompilerArguments.getCoroutinesState()) ||
|
||||||
!additionalArgsOptionsField.getText().equals(compilerSettings.getAdditionalArguments()) ||
|
!additionalArgsOptionsField.getText().equals(compilerSettings.getAdditionalArguments());
|
||||||
enableNewInferenceInIDECheckBox.isSelected() != NewInferenceForIDEAnalysisComponent.isEnabled(project);
|
|
||||||
|
|
||||||
if (shouldInvalidateCaches) {
|
if (shouldInvalidateCaches) {
|
||||||
ApplicationUtilsKt.runWriteAction(
|
ApplicationUtilsKt.runWriteAction(
|
||||||
@@ -538,7 +532,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
commonCompilerArguments.setSuppressWarnings(!reportWarningsCheckBox.isSelected());
|
commonCompilerArguments.setSuppressWarnings(!reportWarningsCheckBox.isSelected());
|
||||||
NewInferenceForIDEAnalysisComponent.setEnabled(project, enableNewInferenceInIDECheckBox.isSelected());
|
|
||||||
KotlinFacetSettingsKt.setLanguageVersionView(commonCompilerArguments, getSelectedLanguageVersionView());
|
KotlinFacetSettingsKt.setLanguageVersionView(commonCompilerArguments, getSelectedLanguageVersionView());
|
||||||
KotlinFacetSettingsKt.setApiVersionView(commonCompilerArguments, getSelectedAPIVersionView());
|
KotlinFacetSettingsKt.setApiVersionView(commonCompilerArguments, getSelectedAPIVersionView());
|
||||||
|
|
||||||
@@ -591,7 +584,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
reportWarningsCheckBox.setSelected(!commonCompilerArguments.getSuppressWarnings());
|
reportWarningsCheckBox.setSelected(!commonCompilerArguments.getSuppressWarnings());
|
||||||
enableNewInferenceInIDECheckBox.setSelected(NewInferenceForIDEAnalysisComponent.isEnabled(project));
|
|
||||||
languageVersionComboBox.setSelectedItem(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments));
|
languageVersionComboBox.setSelectedItem(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments));
|
||||||
onLanguageLevelChanged(getSelectedLanguageVersionView());
|
onLanguageLevelChanged(getSelectedLanguageVersionView());
|
||||||
apiVersionComboBox.setSelectedItem(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments));
|
apiVersionComboBox.setSelectedItem(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments));
|
||||||
@@ -644,10 +636,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
return reportWarningsCheckBox;
|
return reportWarningsCheckBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ThreeStateCheckBox getEnableNewInferenceInIDECheckBox() {
|
|
||||||
return enableNewInferenceInIDECheckBox;
|
|
||||||
}
|
|
||||||
|
|
||||||
public RawCommandLineEditor getAdditionalArgsOptionsField() {
|
public RawCommandLineEditor getAdditionalArgsOptionsField() {
|
||||||
return additionalArgsOptionsField;
|
return additionalArgsOptionsField;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-13
@@ -38,7 +38,6 @@ import org.jetbrains.kotlin.idea.configuration.ProjectUtilsKt;
|
|||||||
import org.jetbrains.kotlin.idea.KotlinBundle;
|
import org.jetbrains.kotlin.idea.KotlinBundle;
|
||||||
import org.jetbrains.kotlin.idea.facet.DescriptionListCellRenderer;
|
import org.jetbrains.kotlin.idea.facet.DescriptionListCellRenderer;
|
||||||
import org.jetbrains.kotlin.idea.facet.KotlinFacet;
|
import org.jetbrains.kotlin.idea.facet.KotlinFacet;
|
||||||
import org.jetbrains.kotlin.idea.project.NewInferenceForIDEAnalysisComponent;
|
|
||||||
import org.jetbrains.kotlin.idea.roots.RootUtilsKt;
|
import org.jetbrains.kotlin.idea.roots.RootUtilsKt;
|
||||||
import org.jetbrains.kotlin.idea.util.CidrUtil;
|
import org.jetbrains.kotlin.idea.util.CidrUtil;
|
||||||
import org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt;
|
import org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt;
|
||||||
@@ -113,7 +112,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
private JLabel labelForSourceMapPrefix;
|
private JLabel labelForSourceMapPrefix;
|
||||||
private JComboBox sourceMapEmbedSources;
|
private JComboBox sourceMapEmbedSources;
|
||||||
private JPanel coroutinesPanel;
|
private JPanel coroutinesPanel;
|
||||||
private ThreeStateCheckBox enableNewInferenceInIDECheckBox;
|
|
||||||
private boolean isEnabled = true;
|
private boolean isEnabled = true;
|
||||||
|
|
||||||
public KotlinCompilerConfigurableTab(
|
public KotlinCompilerConfigurableTab(
|
||||||
@@ -154,7 +152,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
reportWarningsCheckBox.setThirdStateEnabled(isMultiEditor);
|
reportWarningsCheckBox.setThirdStateEnabled(isMultiEditor);
|
||||||
enableNewInferenceInIDECheckBox.setThirdStateEnabled(isMultiEditor);
|
|
||||||
|
|
||||||
if (isProjectSettings) {
|
if (isProjectSettings) {
|
||||||
List<String> modulesOverridingProjectSettings = ArraysKt.mapNotNull(
|
List<String> modulesOverridingProjectSettings = ArraysKt.mapNotNull(
|
||||||
@@ -212,7 +209,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
keepAliveCheckBox.setVisible(false);
|
keepAliveCheckBox.setVisible(false);
|
||||||
k2jvmPanel.setVisible(false);
|
k2jvmPanel.setVisible(false);
|
||||||
enableIncrementalCompilationForJsCheckBox.setVisible(false);
|
enableIncrementalCompilationForJsCheckBox.setVisible(false);
|
||||||
enableNewInferenceInIDECheckBox.setVisible(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateOutputDirEnabled();
|
updateOutputDirEnabled();
|
||||||
@@ -444,7 +440,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isModified() {
|
public boolean isModified() {
|
||||||
return isModified(reportWarningsCheckBox, !commonCompilerArguments.getSuppressWarnings()) ||
|
return isModified(reportWarningsCheckBox, !commonCompilerArguments.getSuppressWarnings()) ||
|
||||||
isModified(enableNewInferenceInIDECheckBox, NewInferenceForIDEAnalysisComponent.isEnabled(project)) ||
|
|
||||||
!getSelectedLanguageVersionView().equals(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments)) ||
|
!getSelectedLanguageVersionView().equals(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments)) ||
|
||||||
!getSelectedAPIVersionView().equals(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments)) ||
|
!getSelectedAPIVersionView().equals(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments)) ||
|
||||||
!getSelectedCoroutineState().equals(commonCompilerArguments.getCoroutinesState()) ||
|
!getSelectedCoroutineState().equals(commonCompilerArguments.getCoroutinesState()) ||
|
||||||
@@ -522,8 +517,7 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
!getSelectedLanguageVersionView().equals(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments)) ||
|
!getSelectedLanguageVersionView().equals(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments)) ||
|
||||||
!getSelectedAPIVersionView().equals(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments)) ||
|
!getSelectedAPIVersionView().equals(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments)) ||
|
||||||
!getSelectedCoroutineState().equals(commonCompilerArguments.getCoroutinesState()) ||
|
!getSelectedCoroutineState().equals(commonCompilerArguments.getCoroutinesState()) ||
|
||||||
!additionalArgsOptionsField.getText().equals(compilerSettings.getAdditionalArguments()) ||
|
!additionalArgsOptionsField.getText().equals(compilerSettings.getAdditionalArguments());
|
||||||
enableNewInferenceInIDECheckBox.isSelected() != NewInferenceForIDEAnalysisComponent.isEnabled(project);
|
|
||||||
|
|
||||||
if (shouldInvalidateCaches) {
|
if (shouldInvalidateCaches) {
|
||||||
ApplicationUtilsKt.runWriteAction(
|
ApplicationUtilsKt.runWriteAction(
|
||||||
@@ -539,7 +533,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
commonCompilerArguments.setSuppressWarnings(!reportWarningsCheckBox.isSelected());
|
commonCompilerArguments.setSuppressWarnings(!reportWarningsCheckBox.isSelected());
|
||||||
NewInferenceForIDEAnalysisComponent.setEnabled(project, enableNewInferenceInIDECheckBox.isSelected());
|
|
||||||
KotlinFacetSettingsKt.setLanguageVersionView(commonCompilerArguments, getSelectedLanguageVersionView());
|
KotlinFacetSettingsKt.setLanguageVersionView(commonCompilerArguments, getSelectedLanguageVersionView());
|
||||||
KotlinFacetSettingsKt.setApiVersionView(commonCompilerArguments, getSelectedAPIVersionView());
|
KotlinFacetSettingsKt.setApiVersionView(commonCompilerArguments, getSelectedAPIVersionView());
|
||||||
|
|
||||||
@@ -592,7 +585,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
reportWarningsCheckBox.setSelected(!commonCompilerArguments.getSuppressWarnings());
|
reportWarningsCheckBox.setSelected(!commonCompilerArguments.getSuppressWarnings());
|
||||||
enableNewInferenceInIDECheckBox.setSelected(NewInferenceForIDEAnalysisComponent.isEnabled(project));
|
|
||||||
languageVersionComboBox.setSelectedItem(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments));
|
languageVersionComboBox.setSelectedItem(KotlinFacetSettingsKt.getLanguageVersionView(commonCompilerArguments));
|
||||||
onLanguageLevelChanged(getSelectedLanguageVersionView());
|
onLanguageLevelChanged(getSelectedLanguageVersionView());
|
||||||
apiVersionComboBox.setSelectedItem(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments));
|
apiVersionComboBox.setSelectedItem(KotlinFacetSettingsKt.getApiVersionView(commonCompilerArguments));
|
||||||
@@ -645,10 +637,6 @@ public class KotlinCompilerConfigurableTab implements SearchableConfigurable {
|
|||||||
return reportWarningsCheckBox;
|
return reportWarningsCheckBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ThreeStateCheckBox getEnableNewInferenceInIDECheckBox() {
|
|
||||||
return enableNewInferenceInIDECheckBox;
|
|
||||||
}
|
|
||||||
|
|
||||||
public RawCommandLineEditor getAdditionalArgsOptionsField() {
|
public RawCommandLineEditor getAdditionalArgsOptionsField() {
|
||||||
return additionalArgsOptionsField;
|
return additionalArgsOptionsField;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user