Reformat: DeprecatedSymbolUsageFix

This commit is contained in:
Mikhail Glukhikh
2018-05-22 17:53:52 +03:00
parent 8d74ff4799
commit 7cb4c91277
@@ -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
}
} }
} }
} }