KTIJ-26423 [AA] Return more info from KtFirImportOptimizer
Deprecate `unusedImports`, since they are supposed to be computed on the IDE side from now on based on the information from Analysis API Currently the `unusedImports` property is not removed completely so it can still be used by the Kotlin side import optimizer tests; they should be moved/adapted to the intellij repository also
This commit is contained in:
+6
-1
@@ -7,6 +7,8 @@ package org.jetbrains.kotlin.analysis.api.components
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.lifetime.KtLifetimeOwner
|
||||
import org.jetbrains.kotlin.analysis.api.lifetime.withValidityAssertion
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.psi.KtImportDirective
|
||||
|
||||
@@ -28,5 +30,8 @@ public interface KtImportOptimizerMixIn : KtAnalysisSessionMixIn {
|
||||
}
|
||||
|
||||
public class KtImportOptimizerResult(
|
||||
public val unusedImports: Set<KtImportDirective>,
|
||||
@Deprecated("Compute unused import on the IntelliJ side instead, see org.jetbrains.kotlin.idea.base.analysis.api.utils.computeUnusedImports")
|
||||
public val unusedImports: Set<KtImportDirective> = emptySet(),
|
||||
public val usedDeclarations: Map<FqName, Set<Name>> = emptyMap(),
|
||||
public val unresolvedNames: Set<Name> = emptySet(),
|
||||
)
|
||||
Reference in New Issue
Block a user