Fix minor compile warnings
This commit is contained in:
+1
@@ -37,6 +37,7 @@ class AndroidExtensionsReferenceSearchExecutor : QueryExecutorBase<PsiReference,
|
||||
override fun processQuery(queryParameters: ReferencesSearch.SearchParameters, consumer: Processor<in PsiReference>) {
|
||||
val elementToSearch = queryParameters.elementToSearch as? XmlAttributeValue ?: return
|
||||
val scopeElements = (queryParameters.effectiveSearchScope as? LocalSearchScope)?.scope ?: return
|
||||
@Suppress("UNNECESSARY_SAFE_CALL", "USELESS_ELVIS") // BUNCH: 182
|
||||
val referenceName = elementToSearch.value?.substringAfterLast("/") ?: return
|
||||
|
||||
scopeElements.filterIsInstance<KtElement>().forEach {
|
||||
|
||||
+2
-1
@@ -33,7 +33,7 @@ class AndroidSimpleNameReferenceExtension : SimpleNameReferenceExtension {
|
||||
element is XmlFile && reference.isReferenceToXmlFile(element)
|
||||
|
||||
private fun isLayoutPackageIdentifier(reference: KtSimpleNameReference): Boolean {
|
||||
val probablyVariant = reference.element?.parent as? KtDotQualifiedExpression ?: return false
|
||||
val probablyVariant = reference.element.parent as? KtDotQualifiedExpression ?: return false
|
||||
val probablyKAS = probablyVariant.receiverExpression as? KtDotQualifiedExpression ?: return false
|
||||
return probablyKAS.receiverExpression.text == AndroidConst.SYNTHETIC_PACKAGE
|
||||
}
|
||||
@@ -51,6 +51,7 @@ class AndroidSimpleNameReferenceExtension : SimpleNameReferenceExtension {
|
||||
return null
|
||||
}
|
||||
|
||||
@Suppress("UNNECESSARY_SAFE_CALL", "USELESS_ELVIS") // BUNCH: 182
|
||||
private fun isIdDeclaration(declaration: XmlAttributeValue) = declaration.value?.startsWith("@+id/") ?: false
|
||||
|
||||
private fun KtSimpleNameReference.isReferenceToXmlFile(xmlFile: XmlFile): Boolean {
|
||||
|
||||
+1
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.android
|
||||
|
||||
abstract class AbstractAndroidFindUsagesTest : KotlinAndroidTestCase() {
|
||||
|
||||
@Suppress("UNREACHABLE_CODE")
|
||||
fun doTest(path: String) {
|
||||
return // TODO: investigate and fix this test
|
||||
copyResourceDirectoryForTest(path)
|
||||
|
||||
Reference in New Issue
Block a user