[kotlin] Move to shared module #KTIJ-32002

GitOrigin-RevId: 25c9f95ba22c0ba009e6d78a051d73b0846507f0
This commit is contained in:
Anna Antonova
2025-09-04 19:04:03 +00:00
committed by intellij-monorepo-bot
parent 513a112f52
commit 5ce68af573
29 changed files with 207 additions and 109 deletions
@@ -433,5 +433,12 @@
<bundleName>messages.KotlinBundle</bundleName>
<categoryKey>group.names.kotlin</categoryKey>
</intentionAction>
<intentionAction>
<language>kotlin</language>
<className>org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ConvertNullablePropertyToLateinitIntention</className>
<bundleName>messages.KotlinBundle</bundleName>
<categoryKey>group.names.kotlin</categoryKey>
</intentionAction>
</extensions>
</idea-plugin>
@@ -1,6 +1,6 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.kotlin.idea.intentions
package org.jetbrains.kotlin.idea.codeInsight.intentions.shared
import com.intellij.modcommand.ActionContext
import com.intellij.modcommand.ModPsiUpdater
@@ -725,6 +725,105 @@ public abstract class SharedK1IntentionTestGenerated extends AbstractSharedK1Int
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../testData/intentions/convertNullablePropertyToLateinit")
public static class ConvertNullablePropertyToLateinit extends AbstractSharedK1IntentionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("abstract.kt")
public void testAbstract() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/abstract.kt");
}
@TestMetadata("delegate.kt")
public void testDelegate() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/delegate.kt");
}
@TestMetadata("extension.kt")
public void testExtension() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/extension.kt");
}
@TestMetadata("getter.kt")
public void testGetter() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/getter.kt");
}
@TestMetadata("inlineClass.kt")
public void testInlineClass() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/inlineClass.kt");
}
@TestMetadata("int.kt")
public void testInt() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/int.kt");
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/local.kt");
}
@TestMetadata("localLegacy.kt")
public void testLocalLegacy() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/localLegacy.kt");
}
@TestMetadata("nonNullInitializer.kt")
public void testNonNullInitializer() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/nonNullInitializer.kt");
}
@TestMetadata("nonNullable.kt")
public void testNonNullable() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/nonNullable.kt");
}
@TestMetadata("nullableUpperBound.kt")
public void testNullableUpperBound() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/nullableUpperBound.kt");
}
@TestMetadata("setter.kt")
public void testSetter() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/setter.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/simple.kt");
}
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/topLevel.kt");
}
@TestMetadata("topLevelLegacy.kt")
public void testTopLevelLegacy() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/topLevelLegacy.kt");
}
@TestMetadata("unsignedInt.kt")
public void testUnsignedInt() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/unsignedInt.kt");
}
@TestMetadata("val.kt")
public void testVal() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/val.kt");
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../testData/intentions/convertOrdinaryPropertyToLazy")
public static class ConvertOrdinaryPropertyToLazy extends AbstractSharedK1IntentionTest {
@@ -725,6 +725,105 @@ public abstract class SharedK2IntentionTestGenerated extends AbstractSharedK2Int
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../testData/intentions/convertNullablePropertyToLateinit")
public static class ConvertNullablePropertyToLateinit extends AbstractSharedK2IntentionTest {
@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("abstract.kt")
public void testAbstract() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/abstract.kt");
}
@TestMetadata("delegate.kt")
public void testDelegate() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/delegate.kt");
}
@TestMetadata("extension.kt")
public void testExtension() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/extension.kt");
}
@TestMetadata("getter.kt")
public void testGetter() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/getter.kt");
}
@TestMetadata("inlineClass.kt")
public void testInlineClass() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/inlineClass.kt");
}
@TestMetadata("int.kt")
public void testInt() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/int.kt");
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/local.kt");
}
@TestMetadata("localLegacy.kt")
public void testLocalLegacy() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/localLegacy.kt");
}
@TestMetadata("nonNullInitializer.kt")
public void testNonNullInitializer() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/nonNullInitializer.kt");
}
@TestMetadata("nonNullable.kt")
public void testNonNullable() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/nonNullable.kt");
}
@TestMetadata("nullableUpperBound.kt")
public void testNullableUpperBound() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/nullableUpperBound.kt");
}
@TestMetadata("setter.kt")
public void testSetter() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/setter.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/simple.kt");
}
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/topLevel.kt");
}
@TestMetadata("topLevelLegacy.kt")
public void testTopLevelLegacy() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/topLevelLegacy.kt");
}
@TestMetadata("unsignedInt.kt")
public void testUnsignedInt() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/unsignedInt.kt");
}
@TestMetadata("val.kt")
public void testVal() throws Exception {
runTest("../testData/intentions/convertNullablePropertyToLateinit/val.kt");
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("../testData/intentions/convertOrdinaryPropertyToLazy")
public static class ConvertOrdinaryPropertyToLazy extends AbstractSharedK2IntentionTest {
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ConvertNullablePropertyToLateinitIntention
@@ -6800,105 +6800,6 @@ public abstract class K1IntentionTestGenerated extends AbstractK1IntentionTest {
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/intentions/convertNullablePropertyToLateinit")
public static class ConvertNullablePropertyToLateinit extends AbstractK1IntentionTest {
@java.lang.Override
@org.jetbrains.annotations.NotNull
public final KotlinPluginMode getPluginMode() {
return KotlinPluginMode.K1;
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@TestMetadata("abstract.kt")
public void testAbstract() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/abstract.kt");
}
@TestMetadata("delegate.kt")
public void testDelegate() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/delegate.kt");
}
@TestMetadata("extension.kt")
public void testExtension() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/extension.kt");
}
@TestMetadata("getter.kt")
public void testGetter() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/getter.kt");
}
@TestMetadata("inlineClass.kt")
public void testInlineClass() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/inlineClass.kt");
}
@TestMetadata("int.kt")
public void testInt() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/int.kt");
}
@TestMetadata("local.kt")
public void testLocal() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/local.kt");
}
@TestMetadata("localLegacy.kt")
public void testLocalLegacy() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/localLegacy.kt");
}
@TestMetadata("nonNullInitializer.kt")
public void testNonNullInitializer() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/nonNullInitializer.kt");
}
@TestMetadata("nonNullable.kt")
public void testNonNullable() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/nonNullable.kt");
}
@TestMetadata("nullableUpperBound.kt")
public void testNullableUpperBound() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/nullableUpperBound.kt");
}
@TestMetadata("setter.kt")
public void testSetter() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/setter.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/simple.kt");
}
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/topLevel.kt");
}
@TestMetadata("topLevelLegacy.kt")
public void testTopLevelLegacy() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/topLevelLegacy.kt");
}
@TestMetadata("unsignedInt.kt")
public void testUnsignedInt() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/unsignedInt.kt");
}
@TestMetadata("val.kt")
public void testVal() throws Exception {
runTest("testData/intentions/convertNullablePropertyToLateinit/val.kt");
}
}
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/intentions/convertObjectLiteralToClass")
public static class ConvertObjectLiteralToClass extends AbstractK1IntentionTest {
@@ -1 +0,0 @@
org.jetbrains.kotlin.idea.intentions.ConvertNullablePropertyToLateinitIntention
@@ -1 +0,0 @@
org.jetbrains.kotlin.idea.k2.codeinsight.intentions.ConvertNullablePropertyToLateinitIntention
@@ -651,13 +651,6 @@
<categoryKey>group.names.kotlin</categoryKey>
</intentionAction>
<intentionAction>
<language>kotlin</language>
<className>org.jetbrains.kotlin.idea.intentions.ConvertNullablePropertyToLateinitIntention</className>
<bundleName>messages.KotlinBundle</bundleName>
<categoryKey>group.names.kotlin</categoryKey>
</intentionAction>
<intentionAction>
<language>kotlin</language>
<className>org.jetbrains.kotlin.idea.intentions.ConvertLateinitPropertyToNullableIntention</className>