From 4ead02271b321dbde04d3b251475495b43ccc9ab Mon Sep 17 00:00:00 2001 From: Marco Pennekamp Date: Tue, 18 Jul 2023 19:16:42 +0200 Subject: [PATCH] [FIR] Move `TrackableModuleInfo` to the common frontend - FIR-specific parts of the Kotlin IntelliJ plugin depend on `TrackableModuleInfo`, so it should be part of the common frontend. --- .../jetbrains/kotlin/analyzer/TrackableModuleInfo.kt | 12 ++++++++++++ .../org/jetbrains/kotlin/analyzer/AnalyzerFacade.kt | 5 ----- 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 compiler/frontend.common/src/org/jetbrains/kotlin/analyzer/TrackableModuleInfo.kt diff --git a/compiler/frontend.common/src/org/jetbrains/kotlin/analyzer/TrackableModuleInfo.kt b/compiler/frontend.common/src/org/jetbrains/kotlin/analyzer/TrackableModuleInfo.kt new file mode 100644 index 00000000000..71251592497 --- /dev/null +++ b/compiler/frontend.common/src/org/jetbrains/kotlin/analyzer/TrackableModuleInfo.kt @@ -0,0 +1,12 @@ +/* + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.analyzer + +import com.intellij.openapi.util.ModificationTracker + +interface TrackableModuleInfo : ModuleInfo { + fun createModificationTracker(): ModificationTracker +} diff --git a/compiler/frontend/src/org/jetbrains/kotlin/analyzer/AnalyzerFacade.kt b/compiler/frontend/src/org/jetbrains/kotlin/analyzer/AnalyzerFacade.kt index b08008527ee..9114c0c2d18 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/analyzer/AnalyzerFacade.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/analyzer/AnalyzerFacade.kt @@ -17,7 +17,6 @@ package org.jetbrains.kotlin.analyzer import com.intellij.openapi.project.Project -import com.intellij.openapi.util.ModificationTracker import com.intellij.psi.search.GlobalSearchScope import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.config.LanguageVersionSettingsImpl @@ -115,10 +114,6 @@ fun ModuleInfo.flatten(): List = when (this) { fun ModuleInfo.unwrapPlatform(): ModuleInfo = if (this is CombinedModuleInfo) platformModule else this -interface TrackableModuleInfo : ModuleInfo { - fun createModificationTracker(): ModificationTracker -} - interface LibraryModuleSourceInfoBase : ModuleInfo interface NonSourceModuleInfoBase : ModuleInfo