mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] Port RestrictedRetentionForExpressionAnnotationFactory for K2
^KTIJ-29620 Fixed GitOrigin-RevId: d7ce975589f14735897a5d5a2a15a4ed5ee8361f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5040f36b78
commit
d96d53225d
+1
@@ -187,6 +187,7 @@ class KotlinK2QuickFixRegistrar : KotlinQuickFixRegistrar() {
|
||||
registerFactory(SurroundWithLambdaForTypeMismatchFixFactory.assignmentTypeMismatchFixFactory)
|
||||
registerFactory(SurroundWithLambdaForTypeMismatchFixFactory.initializerTypeMismatchFixFactory)
|
||||
registerFactory(SurroundWithLambdaForTypeMismatchFixFactory.returnTypeMismatchFixFactory)
|
||||
registerFactory(RestrictedRetentionForExpressionAnnotationFactories.quickFixFactory)
|
||||
}
|
||||
|
||||
private val addAbstract = KtQuickFixesListBuilder.registerPsiQuickFix {
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.k2.codeinsight.fixes
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KaSession
|
||||
import org.jetbrains.kotlin.analysis.api.fir.diagnostics.KaFirDiagnostic
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.idea.codeinsight.api.applicators.fixes.KotlinQuickFixFactory
|
||||
import org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
import org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
import org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
import org.jetbrains.kotlin.idea.quickfix.findExpressionTargetArgument
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.psi.KtAnnotationEntry
|
||||
import org.jetbrains.kotlin.psi.KtClass
|
||||
import org.jetbrains.kotlin.psi.psiUtil.containingClass
|
||||
|
||||
internal object RestrictedRetentionForExpressionAnnotationFactories {
|
||||
|
||||
val quickFixFactory = KotlinQuickFixFactory.ModCommandBased { diagnostic: KaFirDiagnostic.RestrictedRetentionForExpressionAnnotationError ->
|
||||
val annotationEntry = diagnostic.psi as? KtAnnotationEntry ?: return@ModCommandBased emptyList()
|
||||
val containingClass = annotationEntry.containingClass() ?: return@ModCommandBased emptyList()
|
||||
val retentionAnnotation = findAnnotation(containingClass, StandardNames.FqNames.retention)
|
||||
val targetAnnotation = findAnnotation(containingClass, StandardNames.FqNames.target)
|
||||
val expressionTargetArgument = if (targetAnnotation != null) findExpressionTargetArgument(targetAnnotation) else null
|
||||
|
||||
listOfNotNull(
|
||||
if (expressionTargetArgument != null) RemoveExpressionTargetFix(expressionTargetArgument) else null,
|
||||
if (retentionAnnotation == null) AddSourceRetentionFix(containingClass) else ChangeRetentionToSourceFix(retentionAnnotation)
|
||||
)
|
||||
}
|
||||
|
||||
private fun KaSession.findAnnotation(ktClass: KtClass, fqName: FqName): KtAnnotationEntry? {
|
||||
return ktClass.annotationEntries.firstOrNull {
|
||||
it.typeReference?.text?.endsWith(fqName.shortName().asString()) == true
|
||||
&& it.typeReference?.type?.expandedSymbol?.importableFqName == fqName
|
||||
}
|
||||
}
|
||||
}
|
||||
+124
@@ -11233,7 +11233,131 @@ public abstract class HighLevelQuickFixTestGenerated extends AbstractHighLevelQu
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation")
|
||||
public abstract static class RestrictedRetentionForExpressionAnnotation extends AbstractHighLevelQuickFixTest {
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention")
|
||||
public static class AddSourceRetention extends AbstractHighLevelQuickFixTest {
|
||||
@java.lang.Override
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public final KotlinPluginMode getPluginMode() {
|
||||
return KotlinPluginMode.K2;
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("binaryRetention.kt")
|
||||
public void testBinaryRetention() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/binaryRetention.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyRetention.kt")
|
||||
public void testEmptyRetention() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/emptyRetention.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyRetention2.kt")
|
||||
public void testEmptyRetention2() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/emptyRetention2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noRetention.kt")
|
||||
public void testNoRetention() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noRetention2.kt")
|
||||
public void testNoRetention2() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/addSourceRetention/noRetention2.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource")
|
||||
public static class ChangeRetentionToSource extends AbstractHighLevelQuickFixTest {
|
||||
@java.lang.Override
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public final KotlinPluginMode getPluginMode() {
|
||||
return KotlinPluginMode.K2;
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("binaryRetention.kt")
|
||||
public void testBinaryRetention() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/binaryRetention.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyRetention.kt")
|
||||
public void testEmptyRetention() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyRetention2.kt")
|
||||
public void testEmptyRetention2() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyRetention3.kt")
|
||||
public void testEmptyRetention3() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/emptyRetention3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noRetention.kt")
|
||||
public void testNoRetention() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/changeRetentionToSource/noRetention.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget")
|
||||
public static class RemoveExpressionTarget extends AbstractHighLevelQuickFixTest {
|
||||
@java.lang.Override
|
||||
@org.jetbrains.annotations.NotNull
|
||||
public final KotlinPluginMode getPluginMode() {
|
||||
return KotlinPluginMode.K2;
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("binaryRetention.kt")
|
||||
public void testBinaryRetention() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/binaryRetention.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyRetention.kt")
|
||||
public void testEmptyRetention() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyRetention2.kt")
|
||||
public void testEmptyRetention2() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/emptyRetention2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multipleTargets.kt")
|
||||
public void testMultipleTargets() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargets.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multipleTargetsImported.kt")
|
||||
public void testMultipleTargetsImported() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/multipleTargetsImported.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noRetention.kt")
|
||||
public void testNoRetention() throws Exception {
|
||||
runTest("../../../idea/tests/testData/quickfix/restrictedRetentionForExpressionAnnotation/removeExpressionTarget/noRetention.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../../idea/tests/testData/quickfix/simplifyComparison")
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
// "Add SOURCE retention" "true"
|
||||
<caret>@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
+2
-1
@@ -4,4 +4,5 @@ annotation class Retention
|
||||
@Retention
|
||||
<caret>@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
+2
-1
@@ -5,4 +5,5 @@ annotation class Retention
|
||||
@Retention
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.AddSourceRetentionFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
<caret>@Retention(AnnotationRetention.BINARY)
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
<caret>@Retention
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
<caret>@Retention()
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
+2
-1
@@ -4,4 +4,5 @@ class AnnotationRetention
|
||||
<caret>@Retention()
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
+2
-1
@@ -6,4 +6,5 @@ class AnnotationRetention
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.ChangeRetentionToSourceFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
<caret>@Retention(AnnotationRetention.BINARY)
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
// "Remove EXPRESSION target" "true"
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
<caret>@Retention
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
// "Remove EXPRESSION target" "true"
|
||||
@Retention
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
<caret>@Retention()
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
// "Remove EXPRESSION target" "true"
|
||||
@Retention()
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -4,4 +4,5 @@ import kotlin.annotation.AnnotationTarget.*
|
||||
<caret>@Retention
|
||||
@Target(FIELD, EXPRESSION, PROPERTY)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -4,4 +4,5 @@ import kotlin.annotation.AnnotationTarget.*
|
||||
<caret>@Retention
|
||||
@Target(FIELD, PROPERTY)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
<caret>@Retention
|
||||
@Target(AnnotationTarget.FIELD, AnnotationTarget.EXPRESSION, AnnotationTarget.PROPERTY)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -2,4 +2,5 @@
|
||||
<caret>@Retention
|
||||
@Target(AnnotationTarget.FIELD, AnnotationTarget.PROPERTY)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
// "Remove EXPRESSION target" "true"
|
||||
<caret>@Target(AnnotationTarget.EXPRESSION)
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// "Remove EXPRESSION target" "true"
|
||||
annotation class Ann
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.quickfix.RemoveExpressionTargetFix
|
||||
+1
-1
@@ -186,7 +186,7 @@ internal fun MutableTWorkspace.generateK2FixTests() {
|
||||
model("$idea/quickfix/renameUnresolvedReference", pattern = pattern, isIgnored = true)
|
||||
model("$idea/quickfix/reorderParameters", pattern = pattern)
|
||||
model("$idea/quickfix/replaceJvmFieldWithConst", pattern = pattern)
|
||||
model("$idea/quickfix/restrictedRetentionForExpressionAnnotation", pattern = pattern, isIgnored = true)
|
||||
model("$idea/quickfix/restrictedRetentionForExpressionAnnotation", pattern = pattern)
|
||||
model("$idea/quickfix/simplifyComparison", pattern = pattern)
|
||||
model("$idea/quickfix/smartCastImpossibleInIfThen", pattern = pattern)
|
||||
model("$idea/quickfix/specifyOverrideExplicitly", pattern = pattern)
|
||||
|
||||
Reference in New Issue
Block a user