From bbd11fb346175745cf22b9b27785c0e7f38996e3 Mon Sep 17 00:00:00 2001 From: Nikolay Chashnikov Date: Tue, 23 Sep 2025 14:20:24 +0200 Subject: [PATCH] [platform] refactoring: rename ProductModes to ProductModeLoadingRules (IJPL-182310) This is needed to avoid confusing after adding API for accessing the current product mode for IJPL-182310. GitOrigin-RevId: ac445ab261e45a843be054cb85260a1977dfdc77 --- .../intellij/build/impl/moduleBased/JpsProductModeMatcher.kt | 4 ++-- .../impl/{ProductModes.java => ProductModeLoadingRules.java} | 4 ++-- platform/runtime/product/src/impl/ProductModeMatcher.kt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename platform/runtime/product/src/impl/{ProductModes.java => ProductModeLoadingRules.java} (94%) diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/moduleBased/JpsProductModeMatcher.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/moduleBased/JpsProductModeMatcher.kt index 5633d43bb1ff..d8e554231499 100644 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/moduleBased/JpsProductModeMatcher.kt +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/moduleBased/JpsProductModeMatcher.kt @@ -2,7 +2,7 @@ package org.jetbrains.intellij.build.impl.moduleBased import com.intellij.platform.runtime.product.ProductMode -import com.intellij.platform.runtime.product.impl.ProductModes +import com.intellij.platform.runtime.product.impl.ProductModeLoadingRules import org.jetbrains.jps.model.java.JpsJavaExtensionService import org.jetbrains.jps.model.module.JpsModule @@ -10,7 +10,7 @@ import org.jetbrains.jps.model.module.JpsModule * This is an equivalent implementation of [com.intellij.platform.runtime.product.impl.ProductModeMatcher] based on JPS model instead of the runtime module repository. */ internal class JpsProductModeMatcher(productMode: ProductMode) { - private val incompatibleRootModule = ProductModes.getIncompatibleRootModule(productMode).stringId + private val incompatibleRootModule = ProductModeLoadingRules.getIncompatibleRootModule(productMode).stringId private val cache: MutableMap = mutableMapOf() fun matches(module: JpsModule): Boolean { diff --git a/platform/runtime/product/src/impl/ProductModes.java b/platform/runtime/product/src/impl/ProductModeLoadingRules.java similarity index 94% rename from platform/runtime/product/src/impl/ProductModes.java rename to platform/runtime/product/src/impl/ProductModeLoadingRules.java index da230a2f22b5..a64c7fc22fea 100644 --- a/platform/runtime/product/src/impl/ProductModes.java +++ b/platform/runtime/product/src/impl/ProductModeLoadingRules.java @@ -12,8 +12,8 @@ import org.jetbrains.annotations.NotNull; * a module is compatible with explicitly in the future. */ @ApiStatus.Internal -public final class ProductModes { - private ProductModes() { +public final class ProductModeLoadingRules { + private ProductModeLoadingRules() { } /** diff --git a/platform/runtime/product/src/impl/ProductModeMatcher.kt b/platform/runtime/product/src/impl/ProductModeMatcher.kt index a72de4df6ba8..9ca356cf812f 100644 --- a/platform/runtime/product/src/impl/ProductModeMatcher.kt +++ b/platform/runtime/product/src/impl/ProductModeMatcher.kt @@ -6,7 +6,7 @@ import com.intellij.platform.runtime.repository.RuntimeModuleDescriptor import com.intellij.platform.runtime.repository.RuntimeModuleId class ProductModeMatcher(productMode: ProductMode) { - private val myIncompatibleRootModule: String = ProductModes.getIncompatibleRootModule(productMode).stringId + private val myIncompatibleRootModule: String = ProductModeLoadingRules.getIncompatibleRootModule(productMode).stringId private val myCache: MutableMap = mutableMapOf() val unmatchedModules: MutableMap> = mutableMapOf()