mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
IDEA-371744 Primitive Bean definitions are not handled properly in Logical Structure
(cherry picked from commit 45939fff0fcd74ab3f8af0d27e063b0955fd7fa4) IJ-CR-162775 GitOrigin-RevId: 9266de7006088022ae51c5fced0a3718183a513b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
903b720631
commit
d53847d2cf
@@ -74,6 +74,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) {
|
||||
@@ -97,6 +98,10 @@ class LogicalStructureNode(
|
||||
childrenDontMatter = true
|
||||
}
|
||||
|
||||
fun arbitraryChildrenOrder() {
|
||||
childrenOrderDontMatter = true
|
||||
}
|
||||
|
||||
fun navigationElement(element: PsiElement) {
|
||||
navigationElementSupplier = { element }
|
||||
}
|
||||
@@ -135,8 +140,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