Pull Up: Java -> Kotlin interoperability
#KT-5803 Fixed
This commit is contained in:
@@ -148,4 +148,9 @@ private fun deleteElementWithDelimiters(element: PsiElement) {
|
||||
|
||||
public fun PsiElement.deleteSingle() {
|
||||
CodeEditUtil.removeChild(getParent()?.getNode() ?: return, getNode() ?: return)
|
||||
}
|
||||
|
||||
public fun JetClass.getOrCreateCompanionObject() : JetObjectDeclaration {
|
||||
getCompanionObjects().firstOrNull()?.let { return it }
|
||||
return addDeclaration(JetPsiFactory(this).createCompanionObject()) as JetObjectDeclaration
|
||||
}
|
||||
Reference in New Issue
Block a user