From 3da280d176993986d0a1fa6e9e852f421cd6b964 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Mon, 13 Oct 2025 17:25:45 +0200 Subject: [PATCH] IJPL-212573 IJPL-160311 cleanup GitOrigin-RevId: dbf538c35ebd1bbaf60b01b2335a1b99badb2fb5 --- .../jetbrains/intellij/build/impl/PlatformModules.kt | 6 +++--- .../intellij/ide/plugins/ClassPathXmlPathResolver.kt | 7 +++---- .../intellij/platform/plugins/parser/impl/XmlReader.kt | 10 +++++----- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PlatformModules.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PlatformModules.kt index f05da4c177a8..0afb1c6096ef 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PlatformModules.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/PlatformModules.kt @@ -400,7 +400,7 @@ fun collectExportedLibrariesFromLibraryModules( private fun getProductModuleJarName(moduleName: String, context: BuildContext, frontendModuleFilter: FrontendModuleFilter): String { return when { - isModuleCloseSource(moduleName, context = context) -> if (frontendModuleFilter.isBackendModule(moduleName)) PRODUCT_BACKEND_JAR else PRODUCT_JAR + isModuleCloseSource(moduleName = moduleName, context = context) -> if (frontendModuleFilter.isBackendModule(moduleName)) PRODUCT_BACKEND_JAR else PRODUCT_JAR else -> PlatformJarNames.getPlatformModuleJarName(moduleName, frontendModuleFilter) } } @@ -456,8 +456,8 @@ private fun isModuleCloseSource(moduleName: String, context: BuildContext): Bool return false } - return sourceRoots.any { moduleSourceRoot -> - !moduleSourceRoot.path.startsWith(context.paths.communityHomeDir) + return sourceRoots.any { + !it.path.startsWith(context.paths.communityHomeDir) } } diff --git a/platform/core-impl/src/com/intellij/ide/plugins/ClassPathXmlPathResolver.kt b/platform/core-impl/src/com/intellij/ide/plugins/ClassPathXmlPathResolver.kt index de147b8f2858..afc01d66810a 100644 --- a/platform/core-impl/src/com/intellij/ide/plugins/ClassPathXmlPathResolver.kt +++ b/platform/core-impl/src/com/intellij/ide/plugins/ClassPathXmlPathResolver.kt @@ -72,10 +72,9 @@ class ClassPathXmlPathResolver( } } - return PluginDescriptorFromXmlStreamConsumer(readContext, toXIncludeLoader(dataLoader)).let { - it.consume(resource, dataLoader.toString()) - it.getBuilder() - } + val consumer = PluginDescriptorFromXmlStreamConsumer(readContext, toXIncludeLoader(dataLoader)) + consumer.consume(resource, dataLoader.toString()) + return consumer.getBuilder() } override fun resolvePath(readContext: PluginDescriptorReaderContext, dataLoader: DataLoader, relativePath: String): PluginDescriptorBuilder? { diff --git a/platform/plugins/parser/impl/src/com/intellij/platform/plugins/parser/impl/XmlReader.kt b/platform/plugins/parser/impl/src/com/intellij/platform/plugins/parser/impl/XmlReader.kt index b5188f636693..897563dadfca 100644 --- a/platform/plugins/parser/impl/src/com/intellij/platform/plugins/parser/impl/XmlReader.kt +++ b/platform/plugins/parser/impl/src/com/intellij/platform/plugins/parser/impl/XmlReader.kt @@ -413,13 +413,13 @@ private fun readExtensionPoints( if (elementName != PluginXmlConst.EXTENSION_POINT_ELEM) { if (elementName == PluginXmlConst.INCLUDE_ELEM && reader.namespaceURI == PluginXmlConst.XINCLUDE_NAMESPACE_URI) { val partial = PluginDescriptorFromXmlStreamConsumer.withIncludeBase( - consumer.readContext, - consumer.xIncludeLoader, - consumer.includeBase, + readContext = consumer.readContext, + xIncludeLoader = consumer.xIncludeLoader, + includeBase = consumer.includeBase, ) readInclude( - partial, - reader, + consumer = partial, + reader = reader, allowedPointer = PluginXmlConst.EXTENSION_POINTS_XINCLUDE_VALUE ) LOG.warn("`include` is supported only on a root level (${reader.location})")