mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
IDEA-371744 Primitive Bean definitions are not handled properly in Logical Structure
GitOrigin-RevId: 45939fff0fcd74ab3f8af0d27e063b0955fd7fa4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ae234f52bf
commit
cb41c9db01
@@ -75,6 +75,7 @@ class LogicalStructureNode(
|
||||
|
||||
private val subNodes = mutableListOf<LogicalStructureNode>()
|
||||
private var childrenDontMatter = false
|
||||
private var childrenOrderDontMatter = false
|
||||
private var navigationElementSupplier: (() -> PsiElement?)? = null
|
||||
|
||||
fun subNode(subNode: LogicalStructureNode) {
|
||||
@@ -98,6 +99,10 @@ class LogicalStructureNode(
|
||||
childrenDontMatter = true
|
||||
}
|
||||
|
||||
fun arbitraryChildrenOrder() {
|
||||
childrenOrderDontMatter = true
|
||||
}
|
||||
|
||||
fun navigationElement(element: PsiElement) {
|
||||
navigationElementSupplier = { element }
|
||||
}
|
||||
@@ -136,8 +141,15 @@ class LogicalStructureNode(
|
||||
}
|
||||
if (!childrenDontMatter) {
|
||||
if (subNodes.size != other.subNodes.size) return false
|
||||
for (i in subNodes.indices) {
|
||||
if (!subNodes[i].isEqualTo(other.subNodes[i], true, availableDepth - 1)) return false
|
||||
if (childrenOrderDontMatter) {
|
||||
return subNodes.all {
|
||||
other.subNodes.any { otherSubNode -> it.isEqualTo(otherSubNode, true, availableDepth - 1) }
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i in subNodes.indices) {
|
||||
if (!subNodes[i].isEqualTo(other.subNodes[i], true, availableDepth - 1)) return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user