UAST: Reformat KotlinUObjectLiteralExpression.kt
This commit is contained in:
+8
-8
@@ -29,19 +29,19 @@ import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||
import org.jetbrains.uast.*
|
||||
|
||||
class KotlinUObjectLiteralExpression(
|
||||
override val psi: KtObjectLiteralExpression,
|
||||
givenParent: UElement?
|
||||
override val psi: KtObjectLiteralExpression,
|
||||
givenParent: UElement?
|
||||
) : KotlinAbstractUExpression(givenParent), UObjectLiteralExpression, UCallExpressionEx, KotlinUElementWithType {
|
||||
|
||||
override val declaration: UClass by lz {
|
||||
val lightClass: KtLightClass? = psi.objectDeclaration.toLightClass()
|
||||
if (lightClass != null) {
|
||||
getLanguagePlugin().convert<UClass>(lightClass, this)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
logger.error(
|
||||
"Failed to create light class for object declaration",
|
||||
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text))
|
||||
"Failed to create light class for object declaration",
|
||||
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text)
|
||||
)
|
||||
|
||||
getLanguagePlugin().convert(LightPsiClassBuilder(psi, "<unnamed>"), this)
|
||||
}
|
||||
@@ -77,8 +77,8 @@ class KotlinUObjectLiteralExpression(
|
||||
superClassConstructorCall?.let { it.getResolvedCall(it.analyze()) }?.let { getArgumentExpressionByIndex(i, it, this) }
|
||||
|
||||
private class ObjectLiteralClassReference(
|
||||
override val psi: KtSuperTypeCallEntry,
|
||||
givenParent: UElement?
|
||||
override val psi: KtSuperTypeCallEntry,
|
||||
givenParent: UElement?
|
||||
) : KotlinAbstractUElement(givenParent), USimpleNameReferenceExpression {
|
||||
|
||||
override val javaPsi = null
|
||||
|
||||
+10
-8
@@ -28,18 +28,19 @@ import org.jetbrains.kotlin.psi.KtSuperTypeCallEntry
|
||||
import org.jetbrains.uast.*
|
||||
|
||||
class KotlinUObjectLiteralExpression(
|
||||
override val psi: KtObjectLiteralExpression,
|
||||
givenParent: UElement?
|
||||
override val psi: KtObjectLiteralExpression,
|
||||
givenParent: UElement?
|
||||
) : KotlinAbstractUExpression(givenParent), UObjectLiteralExpression, KotlinUElementWithType {
|
||||
|
||||
override val declaration: UClass by lz {
|
||||
val lightClass: KtLightClass? = psi.objectDeclaration.toLightClass()
|
||||
if (lightClass != null) {
|
||||
getLanguagePlugin().convert<UClass>(lightClass, this)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
logger.error(
|
||||
"Failed to create light class for object declaration",
|
||||
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text))
|
||||
"Failed to create light class for object declaration",
|
||||
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text)
|
||||
)
|
||||
|
||||
getLanguagePlugin().convert(LightPsiClassBuilder(psi, "<unnamed>"), this)
|
||||
}
|
||||
@@ -72,9 +73,10 @@ class KotlinUObjectLiteralExpression(
|
||||
override fun resolve() = superClassConstructorCall?.resolveCallToDeclaration(this) as? PsiMethod
|
||||
|
||||
private class ObjectLiteralClassReference(
|
||||
override val psi: KtSuperTypeCallEntry,
|
||||
givenParent: UElement?
|
||||
override val psi: KtSuperTypeCallEntry,
|
||||
givenParent: UElement?
|
||||
) : KotlinAbstractUElement(givenParent), USimpleNameReferenceExpression {
|
||||
|
||||
override fun resolve() = (psi.resolveCallToDeclaration(this) as? PsiMethod)?.containingClass
|
||||
|
||||
override val annotations: List<UAnnotation>
|
||||
|
||||
+8
-8
@@ -28,18 +28,18 @@ import org.jetbrains.kotlin.psi.KtSuperTypeCallEntry
|
||||
import org.jetbrains.uast.*
|
||||
|
||||
class KotlinUObjectLiteralExpression(
|
||||
override val psi: KtObjectLiteralExpression,
|
||||
givenParent: UElement?
|
||||
override val psi: KtObjectLiteralExpression,
|
||||
givenParent: UElement?
|
||||
) : KotlinAbstractUExpression(givenParent), UObjectLiteralExpression, KotlinUElementWithType {
|
||||
override val declaration: UClass by lz {
|
||||
val lightClass: KtLightClass? = psi.objectDeclaration.toLightClass()
|
||||
if (lightClass != null) {
|
||||
getLanguagePlugin().convert<UClass>(lightClass, this)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
logger.error(
|
||||
"Failed to create light class for object declaration",
|
||||
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text))
|
||||
"Failed to create light class for object declaration",
|
||||
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text)
|
||||
)
|
||||
|
||||
getLanguagePlugin().convert(LightPsiClassBuilder(psi, "<unnamed>"), this)
|
||||
}
|
||||
@@ -72,8 +72,8 @@ class KotlinUObjectLiteralExpression(
|
||||
override fun resolve() = superClassConstructorCall?.resolveCallToDeclaration(this) as? PsiMethod
|
||||
|
||||
private class ObjectLiteralClassReference(
|
||||
override val psi: KtSuperTypeCallEntry,
|
||||
givenParent: UElement?
|
||||
override val psi: KtSuperTypeCallEntry,
|
||||
givenParent: UElement?
|
||||
) : KotlinAbstractUElement(givenParent), USimpleNameReferenceExpression {
|
||||
|
||||
override val javaPsi = null
|
||||
|
||||
Reference in New Issue
Block a user