Home
IDEs Support (IntelliJ Platform) | JetBrains
Submit a request
Community
Sign in
Dmitrii Gridin
Total activity
10
Last activity
October 06, 2022 12:27
Member since
March 11, 2021 12:53
Following
0 users
Followed by
0 users
Votes
0
Subscriptions
5
Activity overview
Posts (0)
Comments (5)
Dmitrii Gridin
commented,
October 06, 2022 12:27
Hi! You can use something like val parameter: KtParameterval element = (parameter.typeReference?.typeElement as KtUserType)?.referenceExpression?.mainReference?.resolve() to find corresponding PSI ...
Community
IntelliJ IDEA Open API and Plugin Development
Kotlin PSI find class based on typeReference
0 votes
Dmitrii Gridin
commented,
August 23, 2022 09:06
Hi,You can use HierarchySearchRequest with searchInheritors() extension. Another way – you can convert `KtClass` to `PsiClass` by `toLightClass()` or `toLightClassWithBuiltinMapping()` extension fu...
Community
IntelliJ IDEA Open API and Plugin Development
Find KtClass inheritors
0 votes
Dmitrii Gridin
commented,
March 09, 2022 10:33
Hi Brandon, There are various ways, for example fun function(element: PsiElement, ktElement: KtElement) { element.parents(true).filterIsInstance<KtNamedFunction>().forEach { println(it) ...
Community
IntelliJ IDEA Open API and Plugin Development
Getting declared variables within Kotlin scope
0 votes
Dmitrii Gridin
commented,
December 17, 2021 12:06
You can use Kotlin directly by `org.jetbrains.kotlin.idea.stubindex.KotlinFullClassNameIndex`.Example: KotlinFullClassNameIndex.getInstance().get(fullQualifierName, project, scope) Also, you can w...
Community
IntelliJ IDEA Open API and Plugin Development
PsiElementFinder analogue for Kotlin
0 votes
Dmitrii Gridin
commented,
March 11, 2021 12:55
Hi! You can use something like this to get the class name fun findContainingClassName(callExpression: KtCallExpression): String? { val callableDescriptor = callExpression.resolveToCall()?.result...
Community
IntelliJ IDEA Open API and Plugin Development
How to find the class of a function call (KtNameReferenceExpression)
0 votes