mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
[kotlin] Port InitializePropertyQuickFixFactory to K2
^KTIJ-29621 Fixed GitOrigin-RevId: 6c3d594880b4afce2f8ef2f7f1df5ec9ea601e52
This commit is contained in:
committed by
intellij-monorepo-bot
parent
45ef647ae1
commit
c433a4c2b1
@@ -184,4 +184,13 @@ fun KtExpression.prependDotQualifiedReceiver(receiver: KtExpression, factory: Kt
|
||||
fun KtExpression.appendDotQualifiedSelector(selector: KtExpression, factory: KtPsiFactory): KtExpression {
|
||||
val dotQualified = factory.createExpressionByPattern("$0.$1", this, selector)
|
||||
return this.replaced(dotQualified)
|
||||
}
|
||||
|
||||
fun KtSecondaryConstructor.getOrCreateBody(): KtBlockExpression {
|
||||
bodyExpression?.let { return it }
|
||||
|
||||
val delegationCall = getDelegationCall()
|
||||
val anchor = if (delegationCall.isImplicit) valueParameterList else delegationCall
|
||||
val newBody = KtPsiFactory(project).createEmptyBody()
|
||||
return addAfter(newBody, anchor) as KtBlockExpression
|
||||
}
|
||||
Reference in New Issue
Block a user