mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
KMT-1003 [compose resources] reduce search scope to file level
(cherry picked from commit 96084359b47d4d2fe38c5d66698058307da1f146) GitOrigin-RevId: 4e024ade3cb5c9587631dcae09118c88aa95d899
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f23ed106be
commit
8a1b71a325
@@ -193,8 +193,8 @@ internal fun String.getModuleName(): String? = when (count { it == ':' }) {
|
||||
|
||||
/** check if the new layout from version 1.8.1 is used */
|
||||
private fun KtElement.isNewLayout(): Boolean {
|
||||
val moduleScope = module?.let { GlobalSearchScope.moduleScope(it) } ?: return false
|
||||
return KotlinPropertyShortNameIndex["MD", project, moduleScope].any { it.containingFile == containingFile }
|
||||
val fileScope = GlobalSearchScope.fileScope(containingFile)
|
||||
return KotlinPropertyShortNameIndex["MD", project, fileScope].isNotEmpty()
|
||||
}
|
||||
|
||||
private val log by lazy { fileLogger() }
|
||||
Reference in New Issue
Block a user