mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +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,15 +21,18 @@ import org.jetbrains.uast.internal.log
|
|||||||
|
|
||||||
open class UComment(override val sourcePsi: PsiComment, private val givenParent: UElement?) : UElement {
|
open class UComment(override val sourcePsi: PsiComment, private val givenParent: UElement?) : UElement {
|
||||||
|
|
||||||
|
private val uastParentPart = UastLazyPart<UElement?>()
|
||||||
|
|
||||||
@Suppress("OverridingDeprecatedMember")
|
@Suppress("OverridingDeprecatedMember")
|
||||||
@get:ApiStatus.ScheduledForRemoval
|
@get:ApiStatus.ScheduledForRemoval
|
||||||
@get:Deprecated("see the base property description")
|
@get:Deprecated("see the base property description")
|
||||||
@Deprecated("see the base property description", ReplaceWith("sourcePsi"))
|
@Deprecated("see the base property description", ReplaceWith("sourcePsi"))
|
||||||
override val psi: PsiComment get() = sourcePsi
|
override val psi: PsiComment get() = sourcePsi
|
||||||
|
|
||||||
override val uastParent: UElement? by lazy(LazyThreadSafetyMode.NONE) {
|
override val uastParent: UElement?
|
||||||
givenParent ?: sourcePsi.parent?.toUElement()
|
get() = uastParentPart.getOrBuild {
|
||||||
}
|
givenParent ?: sourcePsi.parent?.toUElement()
|
||||||
|
}
|
||||||
|
|
||||||
val text: String
|
val text: String
|
||||||
get() = asSourceString()
|
get() = asSourceString()
|
||||||
|
|||||||
Reference in New Issue
Block a user