fix mentions of deleted PlatformProjectConfigurator

GitOrigin-RevId: 97a58d0d5dea43833ce1ff6ba08b590f5ccd18c8
This commit is contained in:
Ilia Malakhov
2025-09-02 16:52:49 +00:00
committed by intellij-monorepo-bot
parent a38bcdbed9
commit cd21eaa199
4 changed files with 10 additions and 4 deletions
@@ -15,6 +15,12 @@ import org.jetbrains.annotations.ApiStatus
private val LOG: Logger = Logger.getInstance("FakeModule")
/**
* This method is used to create a "fake" module during project opening before running DirectoryProjectConfigurators
* or when one of them needs it
*
* @see com.intellij.platform.PlatformProjectOpenProcessor.runDirectoryProjectConfigurators
*/
@ApiStatus.Internal
fun Ref<Module>.getOrInitializeModule(project: Project, baseDir: VirtualFile): Module {
if (!this.isNull) {
@@ -77,8 +77,7 @@
implementation="com.intellij.pycharm.community.ide.impl.configuration.PySdkStatusBarWidgetFactory"
order="after CodeStyleStatusBarWidget, before git, before hg, before Notifications"/>
<directoryProjectConfigurator implementation="com.intellij.pycharm.community.ide.impl.PythonSdkConfigurator" id="sdk"
order="after PlatformProjectConfigurator"/>
<directoryProjectConfigurator implementation="com.intellij.pycharm.community.ide.impl.PythonSdkConfigurator" id="sdk"/>
<directoryProjectConfigurator implementation="com.intellij.pycharm.community.ide.impl.PythonSourceRootConfigurator" id="sourceRoot"
order="after sdk"/>
<directoryProjectConfigurator implementation="com.intellij.pycharm.community.ide.impl.PlatformInspectionProfileConfigurator"/>
@@ -137,7 +137,7 @@ abstract class BaseProjectModelService<E : EntitySource, P : ExternalProject> {
* Removes the default IJ module created for the root of the project
* (that's going to be replaced with a module belonging to a specific project management system).
*
* @see com.intellij.platform.PlatformProjectConfigurator
* @see com.intellij.openapi.project.impl.getOrInitializeModule
*/
internal fun removeFakeModuleEntity(project: Project, storage: MutableEntityStorage) {
val virtualFileUrlManager = project.workspaceModel.getVirtualFileUrlManager()
@@ -86,7 +86,8 @@ class UvProjectOpenIntegrationTest {
""".trimIndent())
multiprojectFixture.openProject(projectPath).useProjectAsync { project ->
// Nothing was linked automatically. There is only the module created by PlatformProjectConfigurator.
// Nothing was linked automatically.
// There is only the module created by com.intellij.openapi.project.impl.CreateModuleKt.getOrInitializeModule
ModuleAssertions.assertModules(project, "project")
ContentRootAssertions.assertContentRoots(project, "project", listOf(projectPath))
CollectionAssertions.assertEqualsUnordered(emptyList(), project.service<UvSettings>().getLinkedProjects())