Reformat: DeprecatedSymbolUsageFix
This commit is contained in:
@@ -31,8 +31,8 @@ import org.jetbrains.kotlin.psi.KtSimpleNameExpression
|
|||||||
import org.jetbrains.kotlin.resolve.calls.callUtil.getCalleeExpressionIfAny
|
import org.jetbrains.kotlin.resolve.calls.callUtil.getCalleeExpressionIfAny
|
||||||
|
|
||||||
class DeprecatedSymbolUsageFix(
|
class DeprecatedSymbolUsageFix(
|
||||||
element: KtSimpleNameExpression,
|
element: KtSimpleNameExpression,
|
||||||
replaceWith: ReplaceWith
|
replaceWith: ReplaceWith
|
||||||
) : DeprecatedSymbolUsageFixBase(element, replaceWith), CleanupFix, HighPriorityAction {
|
) : DeprecatedSymbolUsageFixBase(element, replaceWith), CleanupFix, HighPriorityAction {
|
||||||
|
|
||||||
override fun getFamilyName() = "Replace deprecated symbol usage"
|
override fun getFamilyName() = "Replace deprecated symbol usage"
|
||||||
@@ -55,8 +55,9 @@ class DeprecatedSymbolUsageFix(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun isImportToBeRemoved(import: KtImportDirective): Boolean {
|
fun isImportToBeRemoved(import: KtImportDirective): Boolean {
|
||||||
return !import.isAllUnder
|
return !import.isAllUnder && import.targetDescriptors().all {
|
||||||
&& import.targetDescriptors().all { DeprecatedSymbolUsageFixBase.fetchReplaceWithPattern(it, import.project) != null }
|
DeprecatedSymbolUsageFixBase.fetchReplaceWithPattern(it, import.project) != null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user