[FIR IDE] LC Add KtFileSymbol and fix facade annotations

This commit is contained in:
Igor Yakovlev
2020-12-11 20:18:27 +03:00
parent 46071c1925
commit fb63b74b37
8 changed files with 91 additions and 13 deletions
@@ -121,6 +121,8 @@ abstract class KtAnalysisSession(final override val token: ValidityToken) : Vali
fun KtPropertyAccessor.getPropertyAccessorSymbol(): KtPropertyAccessorSymbol = symbolProvider.getPropertyAccessorSymbol(this)
fun KtFile.getFileSymbol(): KtFileSymbol = symbolProvider.getFileSymbol(this)
/**
* @return symbol with specified [this@getClassOrObjectSymbolByClassId] or `null` in case such symbol is not found
*/
@@ -0,0 +1,13 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.idea.frontend.api.symbols
import org.jetbrains.kotlin.idea.frontend.api.symbols.markers.KtAnnotatedSymbol
import org.jetbrains.kotlin.idea.frontend.api.symbols.pointers.KtSymbolPointer
abstract class KtFileSymbol : KtAnnotatedSymbol {
abstract override fun createPointer(): KtSymbolPointer<KtFileSymbol>
}
@@ -30,6 +30,7 @@ abstract class KtSymbolProvider : KtAnalysisSessionComponent() {
}
abstract fun getParameterSymbol(psi: KtParameter): KtParameterSymbol
abstract fun getFileSymbol(psi: KtFile): KtFileSymbol
abstract fun getFunctionSymbol(psi: KtNamedFunction): KtFunctionSymbol
abstract fun getConstructorSymbol(psi: KtConstructor<*>): KtConstructorSymbol
abstract fun getTypeParameterSymbol(psi: KtTypeParameter): KtTypeParameterSymbol