mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
[uast] IDEA-332091 Less memory for UComment instances
GitOrigin-RevId: d11f11a61b5a86aebf6d71aecfb75d3e02f41153
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5d7e54f360
commit
0624f30c19
@@ -21,13 +21,16 @@ import org.jetbrains.uast.internal.log
|
||||
|
||||
open class UComment(override val sourcePsi: PsiComment, private val givenParent: UElement?) : UElement {
|
||||
|
||||
private val uastParentPart = UastLazyPart<UElement?>()
|
||||
|
||||
@Suppress("OverridingDeprecatedMember")
|
||||
@get:ApiStatus.ScheduledForRemoval
|
||||
@get:Deprecated("see the base property description")
|
||||
@Deprecated("see the base property description", ReplaceWith("sourcePsi"))
|
||||
override val psi: PsiComment get() = sourcePsi
|
||||
|
||||
override val uastParent: UElement? by lazy(LazyThreadSafetyMode.NONE) {
|
||||
override val uastParent: UElement?
|
||||
get() = uastParentPart.getOrBuild {
|
||||
givenParent ?: sourcePsi.parent?.toUElement()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user