mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
KTIJ-28122: Sort definitions according to the sources order
GitOrigin-RevId: ce92f860bc1e28bd8efa06b1250e82fb7b6c0f5b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3754b81bc0
commit
bbdbfb23b0
+4
-1
@@ -212,7 +212,10 @@ open class ScriptDefinitionsManager(private val project: Project) : LazyScriptDe
|
||||
withLocks {
|
||||
definitionsBySource.putAll(newDefinitionsBySource)
|
||||
|
||||
loadedDefinitions = definitionsBySource.values.flattenTo(mutableListOf())
|
||||
loadedDefinitions = definitionsBySource
|
||||
.entries
|
||||
.sortedBy { sources.indexOf(it.key).takeIf { it >= 0 } ?: Int.MAX_VALUE }
|
||||
.flatMapTo(mutableListOf()) { it.value }
|
||||
.onEach { it.order = scriptingSettings.getScriptDefinitionOrder(it) }
|
||||
.sortedBy(ScriptDefinition::order)
|
||||
.takeIf { it.isNotEmpty() }
|
||||
|
||||
Reference in New Issue
Block a user