Fix a number of compiler/IDE warnings in IDE and kapt modules
This commit is contained in:
@@ -22,6 +22,7 @@ interface BuildSystemTypeDetector {
|
||||
}
|
||||
|
||||
fun Module.getBuildSystemType(): BuildSystemType {
|
||||
@Suppress("DEPRECATION")
|
||||
for (extension in Extensions.getExtensions(BuildSystemTypeDetector.EP_NAME)) {
|
||||
val result = extension.detectBuildSystemType(this)
|
||||
if (result != null) {
|
||||
|
||||
+5
-2
@@ -31,15 +31,18 @@ abstract class AfterAnalysisHighlightingVisitor protected constructor(
|
||||
holder: AnnotationHolder, protected var bindingContext: BindingContext
|
||||
) : HighlightingVisitor(holder) {
|
||||
|
||||
protected fun attributeKeyForDeclarationFromExtensions(element: PsiElement, descriptor: DeclarationDescriptor) =
|
||||
Extensions.getExtensions(HighlighterExtension.EP_NAME).firstNotNullResult { extension ->
|
||||
protected fun attributeKeyForDeclarationFromExtensions(element: PsiElement, descriptor: DeclarationDescriptor): TextAttributesKey? {
|
||||
@Suppress("DEPRECATION")
|
||||
return Extensions.getExtensions(HighlighterExtension.EP_NAME).firstNotNullResult { extension ->
|
||||
extension.highlightDeclaration(element, descriptor)
|
||||
}
|
||||
}
|
||||
|
||||
protected fun attributeKeyForCallFromExtensions(
|
||||
expression: KtSimpleNameExpression,
|
||||
resolvedCall: ResolvedCall<out CallableDescriptor>
|
||||
): TextAttributesKey? {
|
||||
@Suppress("DEPRECATION")
|
||||
return Extensions.getExtensions(HighlighterExtension.EP_NAME).firstNotNullResult { extension ->
|
||||
extension.highlightCall(expression, resolvedCall)
|
||||
}
|
||||
|
||||
+4
-1
@@ -77,7 +77,10 @@ internal class FunctionsHighlightingVisitor(holder: AnnotationHolder, bindingCon
|
||||
private fun highlightCall(callee: PsiElement, resolvedCall: ResolvedCall<out CallableDescriptor>) {
|
||||
val calleeDescriptor = resolvedCall.resultingDescriptor
|
||||
|
||||
val key = Extensions.getExtensions(HighlighterExtension.EP_NAME).firstNotNullResult { extension ->
|
||||
@Suppress("DEPRECATION")
|
||||
val extensions = Extensions.getExtensions(HighlighterExtension.EP_NAME)
|
||||
|
||||
val key = extensions.firstNotNullResult { extension ->
|
||||
extension.highlightCall(callee, resolvedCall)
|
||||
} ?: when {
|
||||
calleeDescriptor.fqNameOrNull() == KOTLIN_SUSPEND_BUILT_IN_FUNCTION_FQ_NAME -> KEYWORD
|
||||
|
||||
+1
@@ -42,6 +42,7 @@ internal class PropertiesHighlightingVisitor(holder: AnnotationHolder, bindingCo
|
||||
val resolvedCall = expression.getResolvedCall(bindingContext)
|
||||
|
||||
val attributesKey = resolvedCall?.let { call ->
|
||||
@Suppress("DEPRECATION")
|
||||
Extensions.getExtensions(HighlighterExtension.EP_NAME).firstNotNullResult { extension ->
|
||||
extension.highlightCall(expression, call)
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ class QuickFixes {
|
||||
private val actions: Multimap<DiagnosticFactory<*>, IntentionAction> = HashMultimap.create<DiagnosticFactory<*>, IntentionAction>()
|
||||
|
||||
init {
|
||||
@Suppress("DEPRECATION")
|
||||
Extensions.getExtensions(QuickFixContributor.EP_NAME).forEach { it.registerQuickFixes(this) }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user