IDEA-210281 Cleanup Gradle settings: UseQualifiedModuleNames hidden + CreateEmptyContentRootDirectories dropped

* UseQualifiedModuleNames restored backward and forward compatibility.

GitOrigin-RevId: 25c423fcb2f41b8c696d214b7e8ead113a77b7cc
This commit is contained in:
Anton Makeev
2019-05-17 19:06:08 +03:00
committed by intellij-monorepo-bot
parent ebe15ccc87
commit f83875bee9
3 changed files with 10 additions and 1 deletions
@@ -1,6 +1,7 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.externalSystem.settings;
import com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil;
import com.intellij.openapi.util.Comparing;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -29,11 +30,16 @@ public abstract class ExternalProjectSettings implements Comparable<ExternalProj
}
private boolean myUseAutoImport;
private boolean myUseQualifiedModuleNames = true;
private boolean myUseQualifiedModuleNames = !ExternalSystemApiUtil.isJavaCompatibleIde(); // backward-compatible defaults
@SuppressWarnings("DeprecatedIsStillUsed") @Deprecated // left for settings backward-compatibility
private boolean myCreateEmptyContentRootDirectories;
// Used to gradually migrate new project to the new defaults.
public void setupNewProjectDefault() {
myUseQualifiedModuleNames = true;
}
public String getExternalProjectPath() {
return myExternalProjectPath;
}
@@ -25,6 +25,7 @@ public abstract class AbstractExternalModuleBuilder<S extends ExternalProjectSet
@NotNull final S externalProjectSettings) {
myExternalSystemId = externalSystemId;
myExternalProjectSettings = externalProjectSettings;
externalProjectSettings.setupNewProjectDefault();
Icon icon = ExternalSystemUiUtil.getUiAware(externalSystemId).getProjectIcon();
myIcon = icon == null ? super.getNodeIcon() : icon;
}
@@ -81,6 +81,8 @@ public abstract class AbstractImportFromExternalSystemControl<
myExternalSystemId = externalSystemId;
mySystemSettings = systemSettings;
myProjectSettings = projectSettings;
myProjectSettings.setupNewProjectDefault();
myProjectSettingsControl = createProjectSettingsControl(projectSettings);
mySystemSettingsControl = createSystemSettingsControl(systemSettings);
myShowProjectFormatPanel = showProjectFormatPanel;