UAST: Reformat KotlinUObjectLiteralExpression.kt
This commit is contained in:
+3
-3
@@ -37,11 +37,11 @@ class KotlinUObjectLiteralExpression(
|
|||||||
val lightClass: KtLightClass? = psi.objectDeclaration.toLightClass()
|
val lightClass: KtLightClass? = psi.objectDeclaration.toLightClass()
|
||||||
if (lightClass != null) {
|
if (lightClass != null) {
|
||||||
getLanguagePlugin().convert<UClass>(lightClass, this)
|
getLanguagePlugin().convert<UClass>(lightClass, this)
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
logger.error(
|
logger.error(
|
||||||
"Failed to create light class for object declaration",
|
"Failed to create light class for object declaration",
|
||||||
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text))
|
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text)
|
||||||
|
)
|
||||||
|
|
||||||
getLanguagePlugin().convert(LightPsiClassBuilder(psi, "<unnamed>"), this)
|
getLanguagePlugin().convert(LightPsiClassBuilder(psi, "<unnamed>"), this)
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-3
@@ -31,15 +31,16 @@ class KotlinUObjectLiteralExpression(
|
|||||||
override val psi: KtObjectLiteralExpression,
|
override val psi: KtObjectLiteralExpression,
|
||||||
givenParent: UElement?
|
givenParent: UElement?
|
||||||
) : KotlinAbstractUExpression(givenParent), UObjectLiteralExpression, KotlinUElementWithType {
|
) : KotlinAbstractUExpression(givenParent), UObjectLiteralExpression, KotlinUElementWithType {
|
||||||
|
|
||||||
override val declaration: UClass by lz {
|
override val declaration: UClass by lz {
|
||||||
val lightClass: KtLightClass? = psi.objectDeclaration.toLightClass()
|
val lightClass: KtLightClass? = psi.objectDeclaration.toLightClass()
|
||||||
if (lightClass != null) {
|
if (lightClass != null) {
|
||||||
getLanguagePlugin().convert<UClass>(lightClass, this)
|
getLanguagePlugin().convert<UClass>(lightClass, this)
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
logger.error(
|
logger.error(
|
||||||
"Failed to create light class for object declaration",
|
"Failed to create light class for object declaration",
|
||||||
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text))
|
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text)
|
||||||
|
)
|
||||||
|
|
||||||
getLanguagePlugin().convert(LightPsiClassBuilder(psi, "<unnamed>"), this)
|
getLanguagePlugin().convert(LightPsiClassBuilder(psi, "<unnamed>"), this)
|
||||||
}
|
}
|
||||||
@@ -75,6 +76,7 @@ class KotlinUObjectLiteralExpression(
|
|||||||
override val psi: KtSuperTypeCallEntry,
|
override val psi: KtSuperTypeCallEntry,
|
||||||
givenParent: UElement?
|
givenParent: UElement?
|
||||||
) : KotlinAbstractUElement(givenParent), USimpleNameReferenceExpression {
|
) : KotlinAbstractUElement(givenParent), USimpleNameReferenceExpression {
|
||||||
|
|
||||||
override fun resolve() = (psi.resolveCallToDeclaration(this) as? PsiMethod)?.containingClass
|
override fun resolve() = (psi.resolveCallToDeclaration(this) as? PsiMethod)?.containingClass
|
||||||
|
|
||||||
override val annotations: List<UAnnotation>
|
override val annotations: List<UAnnotation>
|
||||||
|
|||||||
+3
-3
@@ -35,11 +35,11 @@ class KotlinUObjectLiteralExpression(
|
|||||||
val lightClass: KtLightClass? = psi.objectDeclaration.toLightClass()
|
val lightClass: KtLightClass? = psi.objectDeclaration.toLightClass()
|
||||||
if (lightClass != null) {
|
if (lightClass != null) {
|
||||||
getLanguagePlugin().convert<UClass>(lightClass, this)
|
getLanguagePlugin().convert<UClass>(lightClass, this)
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
logger.error(
|
logger.error(
|
||||||
"Failed to create light class for object declaration",
|
"Failed to create light class for object declaration",
|
||||||
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text))
|
Attachment(psi.containingFile.virtualFile?.path ?: "<no path>", psi.containingFile.text)
|
||||||
|
)
|
||||||
|
|
||||||
getLanguagePlugin().convert(LightPsiClassBuilder(psi, "<unnamed>"), this)
|
getLanguagePlugin().convert(LightPsiClassBuilder(psi, "<unnamed>"), this)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user