From 4bda3692aa1942a1479fa7db5a785f673a86e93b Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Thu, 24 Nov 2022 13:08:23 +0100 Subject: [PATCH] [SLC] drop SymbolLightIdentifier ^KT-54051 --- .../classes/symbol/SymbolLightIdentifier.kt | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 analysis/symbol-light-classes/src/org/jetbrains/kotlin/light/classes/symbol/SymbolLightIdentifier.kt diff --git a/analysis/symbol-light-classes/src/org/jetbrains/kotlin/light/classes/symbol/SymbolLightIdentifier.kt b/analysis/symbol-light-classes/src/org/jetbrains/kotlin/light/classes/symbol/SymbolLightIdentifier.kt deleted file mode 100644 index 6a76b36169e..00000000000 --- a/analysis/symbol-light-classes/src/org/jetbrains/kotlin/light/classes/symbol/SymbolLightIdentifier.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2010-2022 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.light.classes.symbol - -import com.intellij.psi.PsiElement -import org.jetbrains.kotlin.analysis.api.symbols.KtSymbol -import org.jetbrains.kotlin.analysis.api.symbols.markers.KtNamedSymbol -import org.jetbrains.kotlin.asJava.elements.KtLightIdentifierBase -import org.jetbrains.kotlin.psi.KtNamedDeclaration -import org.jetbrains.kotlin.psi.KtPrimaryConstructor -import org.jetbrains.kotlin.psi.KtPropertyAccessor -import org.jetbrains.kotlin.psi.KtSecondaryConstructor -import org.jetbrains.kotlin.psi.psiUtil.containingClassOrObject - -internal class SymbolLightIdentifier( - lightOwner: PsiElement, - private val ktSymbol: KtSymbol? -) : KtLightIdentifierBase(lightOwner, (ktSymbol as? KtNamedSymbol)?.name?.identifierOrNullIfSpecial) { - override fun copy(): PsiElement = SymbolLightIdentifier(parent, ktSymbol) - - override val origin: PsiElement? - get() = when (val ktDeclaration = ktSymbol?.psi) { - is KtSecondaryConstructor -> ktDeclaration.getConstructorKeyword() - is KtPrimaryConstructor -> ktDeclaration.getConstructorKeyword() - ?: ktDeclaration.valueParameterList - ?: ktDeclaration.containingClassOrObject?.nameIdentifier - - is KtPropertyAccessor -> ktDeclaration.namePlaceholder - is KtNamedDeclaration -> ktDeclaration.nameIdentifier - else -> null - } -}