Remove TextOccurrencesUtil.findNonCodeUsages reprecated usages for 201 platform
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* 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.refactoring.changeSignature;
|
||||||
|
|
||||||
|
import com.intellij.psi.PsiElement;
|
||||||
|
import com.intellij.refactoring.util.TextOccurrencesUtil;
|
||||||
|
import com.intellij.usageView.UsageInfo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
// BUNCH: 201
|
||||||
|
final class BunchedDeprecation {
|
||||||
|
public static void findNonCodeUsages(
|
||||||
|
PsiElement element,
|
||||||
|
String stringToSearch,
|
||||||
|
boolean searchInStringsAndComments,
|
||||||
|
boolean searchInNonJavaFiles,
|
||||||
|
String newQName,
|
||||||
|
Collection<? super UsageInfo> results) {
|
||||||
|
TextOccurrencesUtil.findNonCodeUsages(element, stringToSearch, searchInStringsAndComments, searchInNonJavaFiles, newQName, results);
|
||||||
|
}
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* 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.refactoring.changeSignature;
|
||||||
|
|
||||||
|
import com.intellij.psi.PsiElement;
|
||||||
|
import com.intellij.psi.search.GlobalSearchScope;
|
||||||
|
import com.intellij.refactoring.util.TextOccurrencesUtil;
|
||||||
|
import com.intellij.usageView.UsageInfo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
// BUNCH: 201
|
||||||
|
final class BunchedDeprecation {
|
||||||
|
public static void findNonCodeUsages(
|
||||||
|
PsiElement element,
|
||||||
|
String stringToSearch,
|
||||||
|
boolean searchInStringsAndComments,
|
||||||
|
boolean searchInNonJavaFiles,
|
||||||
|
String newQName,
|
||||||
|
Collection<? super UsageInfo> results) {
|
||||||
|
TextOccurrencesUtil.findNonCodeUsages(element, GlobalSearchScope.projectScope(element.getProject()),
|
||||||
|
stringToSearch, searchInStringsAndComments, searchInNonJavaFiles, newQName, results);
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-2
@@ -20,7 +20,6 @@ import com.intellij.refactoring.rename.UnresolvableCollisionUsageInfo
|
|||||||
import com.intellij.refactoring.util.CommonRefactoringUtil
|
import com.intellij.refactoring.util.CommonRefactoringUtil
|
||||||
import com.intellij.refactoring.util.MoveRenameUsageInfo
|
import com.intellij.refactoring.util.MoveRenameUsageInfo
|
||||||
import com.intellij.refactoring.util.RefactoringUIUtil
|
import com.intellij.refactoring.util.RefactoringUIUtil
|
||||||
import com.intellij.refactoring.util.TextOccurrencesUtil
|
|
||||||
import com.intellij.usageView.UsageInfo
|
import com.intellij.usageView.UsageInfo
|
||||||
import com.intellij.util.containers.HashSet
|
import com.intellij.util.containers.HashSet
|
||||||
import com.intellij.util.containers.MultiMap
|
import com.intellij.util.containers.MultiMap
|
||||||
@@ -262,7 +261,7 @@ class KotlinChangeSignatureUsageProcessor : ChangeSignatureUsageProcessor {
|
|||||||
val oldName = changeInfo.oldName
|
val oldName = changeInfo.oldName
|
||||||
|
|
||||||
if (oldName != null) {
|
if (oldName != null) {
|
||||||
TextOccurrencesUtil.findNonCodeUsages(functionPsi, oldName, true, true, changeInfo.newName, result)
|
BunchedDeprecation.findNonCodeUsages(functionPsi, oldName, true, true, changeInfo.newName, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
val oldParameters = (functionPsi as KtNamedDeclaration).getValueParameters()
|
val oldParameters = (functionPsi as KtNamedDeclaration).getValueParameters()
|
||||||
|
|||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* 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.refactoring.move.moveDeclarations;
|
||||||
|
|
||||||
|
import com.intellij.psi.PsiElement;
|
||||||
|
import com.intellij.refactoring.util.TextOccurrencesUtil;
|
||||||
|
import com.intellij.usageView.UsageInfo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
// BUNCH: 201
|
||||||
|
final class BunchedDeprecation {
|
||||||
|
public static void findNonCodeUsages(
|
||||||
|
PsiElement element,
|
||||||
|
String stringToSearch,
|
||||||
|
boolean searchInStringsAndComments,
|
||||||
|
boolean searchInNonJavaFiles,
|
||||||
|
String newQName,
|
||||||
|
Collection<? super UsageInfo> results) {
|
||||||
|
TextOccurrencesUtil.findNonCodeUsages(element, stringToSearch, searchInStringsAndComments, searchInNonJavaFiles, newQName, results);
|
||||||
|
}
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* 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.refactoring.move.moveDeclarations;
|
||||||
|
|
||||||
|
import com.intellij.psi.PsiElement;
|
||||||
|
import com.intellij.psi.search.GlobalSearchScope;
|
||||||
|
import com.intellij.refactoring.util.TextOccurrencesUtil;
|
||||||
|
import com.intellij.usageView.UsageInfo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
// BUNCH: 201
|
||||||
|
final class BunchedDeprecation {
|
||||||
|
public static void findNonCodeUsages(
|
||||||
|
PsiElement element,
|
||||||
|
String stringToSearch,
|
||||||
|
boolean searchInStringsAndComments,
|
||||||
|
boolean searchInNonJavaFiles,
|
||||||
|
String newQName,
|
||||||
|
Collection<? super UsageInfo> results) {
|
||||||
|
TextOccurrencesUtil.findNonCodeUsages(element, GlobalSearchScope.projectScope(element.getProject()),
|
||||||
|
stringToSearch, searchInStringsAndComments, searchInNonJavaFiles, newQName, results);
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
-3
@@ -22,7 +22,6 @@ import com.intellij.refactoring.move.moveClassesOrPackages.MoveClassHandler
|
|||||||
import com.intellij.refactoring.rename.RenameUtil
|
import com.intellij.refactoring.rename.RenameUtil
|
||||||
import com.intellij.refactoring.util.NonCodeUsageInfo
|
import com.intellij.refactoring.util.NonCodeUsageInfo
|
||||||
import com.intellij.refactoring.util.RefactoringUIUtil
|
import com.intellij.refactoring.util.RefactoringUIUtil
|
||||||
import com.intellij.refactoring.util.TextOccurrencesUtil
|
|
||||||
import com.intellij.usageView.UsageInfo
|
import com.intellij.usageView.UsageInfo
|
||||||
import com.intellij.usageView.UsageViewBundle
|
import com.intellij.usageView.UsageViewBundle
|
||||||
import com.intellij.usageView.UsageViewDescriptor
|
import com.intellij.usageView.UsageViewDescriptor
|
||||||
@@ -224,7 +223,7 @@ class MoveKotlinDeclarationsProcessor(
|
|||||||
val name = lightElement.getKotlinFqName()?.quoteIfNeeded()?.asString()
|
val name = lightElement.getKotlinFqName()?.quoteIfNeeded()?.asString()
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
fun searchForKotlinNameUsages(results: ArrayList<UsageInfo>) {
|
fun searchForKotlinNameUsages(results: ArrayList<UsageInfo>) {
|
||||||
TextOccurrencesUtil.findNonCodeUsages(
|
BunchedDeprecation.findNonCodeUsages(
|
||||||
lightElement,
|
lightElement,
|
||||||
name,
|
name,
|
||||||
descriptor.searchInCommentsAndStrings,
|
descriptor.searchInCommentsAndStrings,
|
||||||
@@ -242,7 +241,7 @@ class MoveKotlinDeclarationsProcessor(
|
|||||||
elementName
|
elementName
|
||||||
)
|
)
|
||||||
|
|
||||||
TextOccurrencesUtil.findNonCodeUsages(
|
BunchedDeprecation.findNonCodeUsages(
|
||||||
lightElement,
|
lightElement,
|
||||||
oldFqNameWithFacade,
|
oldFqNameWithFacade,
|
||||||
descriptor.searchInCommentsAndStrings,
|
descriptor.searchInCommentsAndStrings,
|
||||||
|
|||||||
Reference in New Issue
Block a user