From cd21eaa199a3f903f0943e4ae49d7f4dbc8f5eec Mon Sep 17 00:00:00 2001 From: Ilia Malakhov Date: Tue, 2 Sep 2025 16:46:33 +0200 Subject: [PATCH] fix mentions of deleted PlatformProjectConfigurator GitOrigin-RevId: 97a58d0d5dea43833ce1ff6ba08b590f5ccd18c8 --- .../src/com/intellij/openapi/project/impl/createModule.kt | 6 ++++++ .../impl/resources/intellij.pycharm.community.ide.impl.xml | 3 +-- .../python/projectModel/BaseProjectModelService.kt | 2 +- .../python/projectModel/uv/UvProjectOpenIntegrationTest.kt | 3 ++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/project/impl/createModule.kt b/platform/platform-impl/src/com/intellij/openapi/project/impl/createModule.kt index e5cf8863cfdc..a8d3dffa087e 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/impl/createModule.kt +++ b/platform/platform-impl/src/com/intellij/openapi/project/impl/createModule.kt @@ -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.getOrInitializeModule(project: Project, baseDir: VirtualFile): Module { if (!this.isNull) { diff --git a/python/ide/impl/resources/intellij.pycharm.community.ide.impl.xml b/python/ide/impl/resources/intellij.pycharm.community.ide.impl.xml index eeade4d12fb1..80df6da59fa3 100644 --- a/python/ide/impl/resources/intellij.pycharm.community.ide.impl.xml +++ b/python/ide/impl/resources/intellij.pycharm.community.ide.impl.xml @@ -77,8 +77,7 @@ implementation="com.intellij.pycharm.community.ide.impl.configuration.PySdkStatusBarWidgetFactory" order="after CodeStyleStatusBarWidget, before git, before hg, before Notifications"/> - + diff --git a/python/src/com/jetbrains/python/projectModel/BaseProjectModelService.kt b/python/src/com/jetbrains/python/projectModel/BaseProjectModelService.kt index 126106b2bf91..a317d0f0d0f6 100644 --- a/python/src/com/jetbrains/python/projectModel/BaseProjectModelService.kt +++ b/python/src/com/jetbrains/python/projectModel/BaseProjectModelService.kt @@ -137,7 +137,7 @@ abstract class BaseProjectModelService { * 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() diff --git a/python/testSrc/com/jetbrains/python/projectModel/uv/UvProjectOpenIntegrationTest.kt b/python/testSrc/com/jetbrains/python/projectModel/uv/UvProjectOpenIntegrationTest.kt index 6f5432649725..615c3ef552f3 100644 --- a/python/testSrc/com/jetbrains/python/projectModel/uv/UvProjectOpenIntegrationTest.kt +++ b/python/testSrc/com/jetbrains/python/projectModel/uv/UvProjectOpenIntegrationTest.kt @@ -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().getLinkedProjects())