Restore support for 173 branch
This commit is contained in:
@@ -23,7 +23,6 @@ import com.intellij.psi.PsiClass
|
|||||||
import com.intellij.psi.PsiField
|
import com.intellij.psi.PsiField
|
||||||
import com.intellij.psi.PsiMethod
|
import com.intellij.psi.PsiMethod
|
||||||
import com.intellij.psi.search.GlobalSearchScope
|
import com.intellij.psi.search.GlobalSearchScope
|
||||||
import com.intellij.psi.search.PsiShortNamesCache
|
|
||||||
import com.intellij.psi.stubs.StubIndex
|
import com.intellij.psi.stubs.StubIndex
|
||||||
import com.intellij.util.ArrayUtil
|
import com.intellij.util.ArrayUtil
|
||||||
import com.intellij.util.Processor
|
import com.intellij.util.Processor
|
||||||
@@ -46,7 +45,7 @@ import org.jetbrains.kotlin.psi.KtFile
|
|||||||
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
||||||
import org.jetbrains.kotlin.psi.KtNamedFunction
|
import org.jetbrains.kotlin.psi.KtNamedFunction
|
||||||
|
|
||||||
class KotlinShortNamesCache(private val project: Project) : PsiShortNamesCache() {
|
class KotlinShortNamesCache(private val project: Project) : PsiShortNamesCacheWrapper() {
|
||||||
//region Classes
|
//region Classes
|
||||||
|
|
||||||
override fun processAllClassNames(processor: Processor<String>): Boolean {
|
override fun processAllClassNames(processor: Processor<String>): Boolean {
|
||||||
|
|||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.idea.caches
|
||||||
|
|
||||||
|
import com.intellij.psi.search.PsiShortNamesCache
|
||||||
|
|
||||||
|
typealias PsiShortNamesCacheWrapper = PsiShortNamesCache
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Need to implement deprecated methods. Should be removed after abandoning 173 and AS 3.1 branch.
|
||||||
|
// BUNCH: 181
|
||||||
|
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||||
|
abstract class PsiShortNamesCacheCompatibility : PsiShortNamesCache() {
|
||||||
|
override fun getAllClassNames(dest: com.intellij.util.containers.HashSet<String>) {
|
||||||
|
processAllClassNames(com.intellij.util.CommonProcessors.CollectProcessor(dest))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getAllMethodNames(set: com.intellij.util.containers.HashSet<String>) {
|
||||||
|
java.util.Collections.addAll(set, *allMethodNames)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getAllFieldNames(set: com.intellij.util.containers.HashSet<String>) {
|
||||||
|
java.util.Collections.addAll(set, *allFieldNames)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.idea.caches
|
||||||
|
|
||||||
|
import com.intellij.psi.search.PsiShortNamesCache
|
||||||
|
|
||||||
|
typealias PsiShortNamesCacheWrapper = PsiShortNamesCacheCompatibility
|
||||||
|
|
||||||
|
// Need to implement deprecated methods. Should be removed after abandoning 173 and AS 3.1 branch.
|
||||||
|
// BUNCH: 181
|
||||||
|
@Suppress("OverridingDeprecatedMember", "DEPRECATION")
|
||||||
|
abstract class PsiShortNamesCacheCompatibility : PsiShortNamesCache() {
|
||||||
|
override fun getAllClassNames(dest: com.intellij.util.containers.HashSet<String>) {
|
||||||
|
processAllClassNames(com.intellij.util.CommonProcessors.CollectProcessor(dest))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getAllMethodNames(set: com.intellij.util.containers.HashSet<String>) {
|
||||||
|
java.util.Collections.addAll(set, *allMethodNames)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getAllFieldNames(set: com.intellij.util.containers.HashSet<String>) {
|
||||||
|
java.util.Collections.addAll(set, *allFieldNames)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user