[Analysis API] extract the data from the ShortenCommandImpl to the base class
^KT-58992
This commit is contained in:
committed by
Space Team
parent
fffc921d42
commit
95cf892eec
+9
-6
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.analysis.api.lifetime.withValidityAssertion
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtCallableSymbol
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtClassLikeSymbol
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtEnumEntrySymbol
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.psi.KtDotQualifiedExpression
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
@@ -118,12 +119,14 @@ public interface KtReferenceShortenerMixIn : KtAnalysisSessionMixIn {
|
||||
}
|
||||
|
||||
public interface ShortenCommand {
|
||||
/**
|
||||
* Shortens target elements, adds necessary import, and returns a list of the shortened result elements.
|
||||
*/
|
||||
public fun invokeShortening(): List<KtElement>
|
||||
public val targetFile: SmartPsiElementPointer<KtFile>
|
||||
public val importsToAdd: List<FqName>
|
||||
public val starImportsToAdd: List<FqName>
|
||||
public val typesToShorten: List<SmartPsiElementPointer<KtUserType>>
|
||||
public val qualifiersToShorten: List<SmartPsiElementPointer<KtDotQualifiedExpression>>
|
||||
|
||||
public val isEmpty: Boolean
|
||||
public fun getTypesToShorten(): List<SmartPsiElementPointer<KtUserType>>
|
||||
public fun getQualifiersToShorten(): List<SmartPsiElementPointer<KtDotQualifiedExpression>>
|
||||
get() = typesToShorten.isEmpty() && qualifiersToShorten.isEmpty()
|
||||
|
||||
public fun invokeShortening(): List<KtElement>
|
||||
}
|
||||
Reference in New Issue
Block a user