diff --git a/plugins/kotlin/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/after.kt.template b/plugins/kotlin/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/after.kt.template
deleted file mode 100644
index a8701323b86f..000000000000
--- a/plugins/kotlin/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/after.kt.template
+++ /dev/null
@@ -1,4 +0,0 @@
-@deprecated("Use newFun instead", ReplaceWith("newFun(null)"))
-fun oldFun(): Int {
- return newFun(null)
-}
\ No newline at end of file
diff --git a/plugins/kotlin/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/before.kt.template b/plugins/kotlin/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/before.kt.template
deleted file mode 100644
index d59280139863..000000000000
--- a/plugins/kotlin/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/before.kt.template
+++ /dev/null
@@ -1,4 +0,0 @@
-@deprecated("Use newFun instead")
-fun oldFun(): Int {
- return newFun(null)
-}
\ No newline at end of file
diff --git a/plugins/kotlin/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/description.html b/plugins/kotlin/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/description.html
deleted file mode 100644
index 19846598e5da..000000000000
--- a/plugins/kotlin/idea/resources/intentionDescriptions/DeprecatedCallableAddReplaceWithIntention/description.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-This intention adds a kotlin.ReplaceWith argument to a kotlin.deprecated annotation on a function or a property based on its body.
-
-
\ No newline at end of file
diff --git a/plugins/kotlin/idea/src/META-INF/plugin.xml b/plugins/kotlin/idea/src/META-INF/plugin.xml
index 2e7d50bef07f..7ec629bff6a6 100644
--- a/plugins/kotlin/idea/src/META-INF/plugin.xml
+++ b/plugins/kotlin/idea/src/META-INF/plugin.xml
@@ -1203,11 +1203,6 @@
Kotlin
-
- org.jetbrains.kotlin.idea.intentions.DeprecatedCallableAddReplaceWithIntention
- Kotlin
-
-
org.jetbrains.kotlin.idea.intentions.AddNameToArgumentIntention
Kotlin
@@ -1605,7 +1600,7 @@
language="kotlin"
/>
- (DeprecatedCallableAddReplaceWithIntention::class)
-
-class DeprecatedCallableAddReplaceWithIntention : SelfTargetingRangeIntention(
- KtCallableDeclaration::class.java, "Add 'replaceWith' argument to specify replacement pattern", "Add 'replaceWith' argument to 'Deprecated' annotation"
+class DeprecatedCallableAddReplaceWithInspection : AbstractApplicabilityBasedInspection(
+ KtCallableDeclaration::class.java
) {
+ override fun inspectionText(element: KtCallableDeclaration) =
+ "@Deprecated annotation without 'replaceWith' argument"
+
+ override fun inspectionTarget(element: KtCallableDeclaration): KtAnnotationEntry =
+ element.annotationEntries.first { it.shortName == DEPRECATED_NAME }
+
+ override val defaultFixText =
+ "Add 'replaceWith' argument to specify replacement pattern"
+
private class ReplaceWith(val expression: String, vararg val imports: String)
- override fun applicabilityRange(element: KtCallableDeclaration): TextRange? {
- val annotationEntry = element.deprecatedAnnotationWithNoReplaceWith() ?: return null
- if (element.suggestReplaceWith() == null) return null
- return annotationEntry.textRange
+ override fun isApplicable(element: KtCallableDeclaration): Boolean {
+ element.deprecatedAnnotationWithNoReplaceWith() ?: return false
+ return element.suggestReplaceWith() != null
}
- override fun applyTo(element: KtCallableDeclaration, editor: Editor?) {
- val replaceWith = element.suggestReplaceWith()!!
+ override fun applyTo(element: PsiElement, project: Project, editor: Editor?) {
+ val declaration = element.getParentOfType(strict = true) ?: return
+ val replaceWith = declaration.suggestReplaceWith()!!
assert('\n' !in replaceWith.expression && '\r' !in replaceWith.expression) { "Formatted expression text should not contain \\n or \\r" }
- val annotationEntry = element.deprecatedAnnotationWithNoReplaceWith()!!
- val psiFactory = KtPsiFactory(element)
+ val annotationEntry = declaration.deprecatedAnnotationWithNoReplaceWith()!!
+ val psiFactory = KtPsiFactory(declaration)
- var escapedText = replaceWith.expression
- .replace("\\", "\\\\")
- .replace("\"", "\\\"")
+ var escapedText = replaceWith.expression.replace("\\", "\\\\").replace("\"", "\\\"")
// escape '$' if it's followed by a letter or '{'
if (escapedText.contains('$')) {
@@ -108,15 +103,12 @@ class DeprecatedCallableAddReplaceWithIntention : SelfTargetingRangeIntention()
- expression.accept(object : KtVisitorVoid(){
+ expression.accept(object : KtVisitorVoid() {
override fun visitSimpleNameExpression(expression: KtSimpleNameExpression) {
val bindingContext = expression.analyze()
val target = bindingContext[BindingContext.SHORT_REFERENCE_TO_COMPANION_OBJECT, expression]
@@ -221,7 +217,8 @@ class DeprecatedCallableAddReplaceWithIntention : SelfTargetingRangeIntention@Deprecated("", ReplaceWith("bar()"))
fun foo() {
bar()
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/CommentInBody.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/CommentInBody.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/CommentInBody.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/CommentInBody.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/CommentInBody.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/DeclarationInside.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/DeclarationInside.kt
similarity index 81%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/DeclarationInside.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/DeclarationInside.kt
index df53bc2b9eac..a118fdc00515 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/DeclarationInside.kt
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/DeclarationInside.kt
@@ -1,4 +1,4 @@
-// IS_APPLICABLE: false
+// PROBLEM: none
@Deprecated("")
fun foo(p: Int) {
if (p > 0) {
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/DeprecationLevelHidden.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/DeprecationLevelHidden.kt
similarity index 85%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/DeprecationLevelHidden.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/DeprecationLevelHidden.kt
index dbaf1d2c5072..c193953a351c 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/DeprecationLevelHidden.kt
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/DeprecationLevelHidden.kt
@@ -1,4 +1,4 @@
-// IS_APPLICABLE: false
+// PROBLEM: none
@Deprecated("Use the other version", level=DeprecationLevel.HIDDEN)
fun foo(a: Int) { foo(a) }
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ExceptionInPropertyDestructuringEntry.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExceptionInPropertyDestructuringEntry.kt
similarity index 75%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ExceptionInPropertyDestructuringEntry.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExceptionInPropertyDestructuringEntry.kt
index 89f42034045f..bd789055cf7c 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ExceptionInPropertyDestructuringEntry.kt
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExceptionInPropertyDestructuringEntry.kt
@@ -1,4 +1,4 @@
-// IS_APPLICABLE: false
+// PROBLEM: none
// See KT-7929, EA-76715
class C {
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExpressionBody.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExpressionBody.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExpressionBody.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ExpressionBody.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExpressionBody.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/If.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/If.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/If.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/If.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/If.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/If.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/If.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/If.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Imports.1.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Imports.1.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Imports.1.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Imports.1.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Imports.1.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Imports.1.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Imports.1.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Imports.1.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Imports.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Imports.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Imports.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Imports.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Imports.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.1.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoDefaultImport.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoDefaultImport.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoDefaultImport.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoDefaultImport.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoDefaultImport.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoReturn.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoReturn.kt
similarity index 87%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoReturn.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoReturn.kt
index 9ffb554fbb5e..91ef95f90ffa 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NoReturn.kt
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoReturn.kt
@@ -1,4 +1,4 @@
-// IS_APPLICABLE: false
+// PROBLEM: none
// ERROR: A 'return' expression required in a function with a block body ('{...}')
@Deprecated("")
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt
similarity index 79%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt
index cd2d4ce45b20..e1351aadb954 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt
@@ -1,4 +1,4 @@
-// IS_APPLICABLE: false
+// PROBLEM: none
/**
* This is a doc-comment
*/
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt
similarity index 83%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt
index 1e6fa3972731..cb050aa3ce0d 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt
@@ -1,4 +1,4 @@
-// IS_APPLICABLE: false
+// PROBLEM: none
class C {
private val v = 1
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/QualifiedCall.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/QualifiedCall.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/QualifiedCall.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/QualifiedCall.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/QualifiedCall.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Return.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Return.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Return.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Return.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Return.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ReturnInside.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ReturnInside.kt
similarity index 77%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ReturnInside.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ReturnInside.kt
index d3db91d9aa84..dd11abdd05b3 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ReturnInside.kt
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ReturnInside.kt
@@ -1,4 +1,4 @@
-// IS_APPLICABLE: false
+// PROBLEM: none
@Deprecated("")
fun foo() {
bar() ?: return
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Simple.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Simple.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Simple.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/Simple.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Simple.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringLiteral.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringLiteral.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringLiteral.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/StringLiteral.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringLiteral.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/StringTemplate.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringTemplate.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/StringTemplate.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringTemplate.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/StringTemplate.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringTemplate.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/StringTemplate.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringTemplate.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/TwoStatements.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/TwoStatements.kt
similarity index 74%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/TwoStatements.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/TwoStatements.kt
index f70d9e0bb36c..aabe63e1a23c 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/TwoStatements.kt
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/TwoStatements.kt
@@ -1,4 +1,4 @@
-// IS_APPLICABLE: false
+// PROBLEM: none
@Deprecated("")
fun foo() {
bar()
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValProperty.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValProperty.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValProperty.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ValProperty.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValProperty.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt.after b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt.after
similarity index 100%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt.after
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt.after
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/destructuringWithLambdaInScript.kts b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/destructuringWithLambdaInScript.kts
similarity index 83%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/destructuringWithLambdaInScript.kts
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/destructuringWithLambdaInScript.kts
index b8e6fa2899d1..5ad8c13c6bbd 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/destructuringWithLambdaInScript.kts
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/destructuringWithLambdaInScript.kts
@@ -1,4 +1,4 @@
-// IS_APPLICABLE: false
+// PROBLEM: none
// WITH_RUNTIME
// SKIP_ERRORS_BEFORE
// SKIP_ERRORS_AFTER
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/expected.xml b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/inspectionData/expected.xml
similarity index 60%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/expected.xml
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/inspectionData/expected.xml
index 23de8979c51c..caa8b824b00f 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/expected.xml
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/inspectionData/expected.xml
@@ -4,8 +4,8 @@
2
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -14,8 +14,8 @@
2
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -23,8 +23,8 @@
1
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -32,8 +32,8 @@
1
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -41,8 +41,8 @@
1
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -50,8 +50,8 @@
1
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -59,8 +59,8 @@
1
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -68,8 +68,8 @@
5
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -77,8 +77,8 @@
2
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -86,8 +86,8 @@
5
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -95,8 +95,8 @@
5
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -104,8 +104,8 @@
1
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -113,8 +113,8 @@
1
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
@@ -122,7 +122,7 @@
1
light_idea_test_case
- Add 'replaceWith' argument to 'deprecated' annotation
- Add 'replaceWith' argument to specify replacement pattern
+ @Deprecated annotation without 'replaceWith' argument
+ @Deprecated annotation without 'replaceWith' argument
\ No newline at end of file
diff --git a/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/inspectionData/inspections.test b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/inspectionData/inspections.test
new file mode 100644
index 000000000000..6fcdada27cfa
--- /dev/null
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/inspectionData/inspections.test
@@ -0,0 +1 @@
+// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.DeprecatedCallableAddReplaceWithInspection
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/justLambdaInScript.kts b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/justLambdaInScript.kts
similarity index 81%
rename from plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/justLambdaInScript.kts
rename to plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/justLambdaInScript.kts
index c7e81fed9294..77f0cea166df 100644
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/justLambdaInScript.kts
+++ b/plugins/kotlin/idea/tests/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/justLambdaInScript.kts
@@ -1,4 +1,4 @@
-// IS_APPLICABLE: false
+// PROBLEM: none
// WITH_RUNTIME
// SKIP_ERRORS_BEFORE
// SKIP_ERRORS_AFTER
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/.intention b/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/.intention
deleted file mode 100644
index d665c029dd4c..000000000000
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/.intention
+++ /dev/null
@@ -1 +0,0 @@
-org.jetbrains.kotlin.idea.intentions.DeprecatedCallableAddReplaceWithIntention
diff --git a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/inspections.test b/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/inspections.test
deleted file mode 100644
index 3a8ac1e6cc56..000000000000
--- a/plugins/kotlin/idea/tests/testData/intentions/deprecatedCallableAddReplaceWith/inspectionData/inspections.test
+++ /dev/null
@@ -1 +0,0 @@
-// INSPECTION_CLASS: org.jetbrains.kotlin.idea.intentions.DeprecatedCallableAddReplaceWithInspection