mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] show method calls before closure blocks
This commit is contained in:
+1
-2
@@ -26,7 +26,6 @@ import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrVariableDeclaratio
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks.GrClosableBlock
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrMethodCall
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrReferenceExpression
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.path.GrMethodCallExpression
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.GrAnonymousClassDefinition
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrEnumConstant
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMember
|
||||
@@ -50,7 +49,7 @@ class GroovyBreadcrumbsInfoProvider : BreadcrumbsInfoProvider() {
|
||||
|
||||
override fun getElementInfo(e: PsiElement) = when (e) {
|
||||
is GrVariableDeclaration -> e.variables.single().name
|
||||
is GrClosableBlock -> ((e.parent as? GrMethodCall)?.invokedExpression?.text?.substringAfterLast('.')?.trim()?:"") + "{}"
|
||||
is GrClosableBlock -> (((e.parent as? GrMethodCall)?.invokedExpression as? GrReferenceExpression)?.referenceName ?: "") + "{}"
|
||||
is GrAnonymousClassDefinition -> "new ${e.baseClassReferenceGroovy.referenceName}"
|
||||
is GrMethod -> "${e.name}()"
|
||||
is GrMember -> e.name!!
|
||||
|
||||
Reference in New Issue
Block a user