201: Processor<in PsiMethod> used in PsiShortNamesCache
This commit is contained in:
@@ -245,7 +245,7 @@ class KotlinShortNamesCache(private val project: Project) : PsiShortNamesCache()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun processMethodsWithName(name: String, scope: GlobalSearchScope, processor: Processor<PsiMethod>): Boolean {
|
override fun processMethodsWithName(name: String, scope: GlobalSearchScope, processor: PsiMethodProcessor): Boolean {
|
||||||
if (disableSearch.get()) return true
|
if (disableSearch.get()) return true
|
||||||
return ContainerUtil.process(getMethodsByName(name, scope), processor)
|
return ContainerUtil.process(getMethodsByName(name, scope), processor)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,10 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.idea.caches
|
package org.jetbrains.kotlin.idea.caches
|
||||||
|
|
||||||
|
import com.intellij.psi.PsiMethod
|
||||||
import com.intellij.util.Processor
|
import com.intellij.util.Processor
|
||||||
|
|
||||||
// BUNCH 193
|
// BUNCH 193
|
||||||
typealias StringProcessor = Processor<String>
|
typealias StringProcessor = Processor<String>
|
||||||
|
typealias PsiMethodProcessor = Processor<PsiMethod>
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,10 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.idea.caches
|
package org.jetbrains.kotlin.idea.caches
|
||||||
|
|
||||||
|
import com.intellij.psi.PsiMethod
|
||||||
import com.intellij.util.Processor
|
import com.intellij.util.Processor
|
||||||
|
|
||||||
// BUNCH 193
|
// BUNCH 193
|
||||||
typealias StringProcessor = Processor<in String>
|
typealias StringProcessor = Processor<in String>
|
||||||
|
typealias PsiMethodProcessor = Processor<in PsiMethod>
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -24,7 +24,7 @@ import com.intellij.psi.impl.java.stubs.index.JavaShortClassNameIndex
|
|||||||
import com.intellij.psi.search.GlobalSearchScope
|
import com.intellij.psi.search.GlobalSearchScope
|
||||||
import com.intellij.psi.search.PsiShortNamesCache
|
import com.intellij.psi.search.PsiShortNamesCache
|
||||||
import com.intellij.psi.stubs.StubIndex
|
import com.intellij.psi.stubs.StubIndex
|
||||||
import com.intellij.util.Processor
|
import org.jetbrains.kotlin.idea.caches.PsiMethodProcessor
|
||||||
import org.jetbrains.kotlin.idea.core.script.ScriptConfigurationManager
|
import org.jetbrains.kotlin.idea.core.script.ScriptConfigurationManager
|
||||||
|
|
||||||
// Allow searching java classes in jars in script dependencies, this is needed for stuff like completion and autoimport
|
// Allow searching java classes in jars in script dependencies, this is needed for stuff like completion and autoimport
|
||||||
@@ -47,7 +47,7 @@ class JavaClassesInScriptDependenciesShortNameCache(private val project: Project
|
|||||||
|
|
||||||
override fun getMethodsByNameIfNotMoreThan(name: String, scope: GlobalSearchScope, maxCount: Int): Array<PsiMethod> = PsiMethod.EMPTY_ARRAY
|
override fun getMethodsByNameIfNotMoreThan(name: String, scope: GlobalSearchScope, maxCount: Int): Array<PsiMethod> = PsiMethod.EMPTY_ARRAY
|
||||||
|
|
||||||
override fun processMethodsWithName(name: String, scope: GlobalSearchScope, processor: Processor<PsiMethod>) = true
|
override fun processMethodsWithName(name: String, scope: GlobalSearchScope, processor: PsiMethodProcessor) = true
|
||||||
|
|
||||||
override fun getAllFieldNames() = emptyArray<String>()
|
override fun getAllFieldNames() = emptyArray<String>()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user