[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
This commit is contained in:
Nikolay Chashnikov
2025-09-24 09:37:29 +00:00
committed by intellij-monorepo-bot
parent bf574a1f0e
commit bbd11fb346
3 changed files with 5 additions and 5 deletions
@@ -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<JpsModule, Boolean> = mutableMapOf()
fun matches(module: JpsModule): Boolean {
@@ -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() {
}
/**
@@ -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<String, Boolean> = mutableMapOf()
val unmatchedModules: MutableMap<RuntimeModuleId, List<RuntimeModuleId>> = mutableMapOf()