mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] Support K2 AddMissingClassKeywordIntention
^KTIJ-22950 fixed GitOrigin-RevId: c83d270ad1acf33f0694bf39d839d53da1c559a0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
04302d8442
commit
95a40dd059
+48
@@ -18,6 +18,54 @@ import org.junit.runner.RunWith;
|
||||
@TestDataPath("$CONTENT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public abstract class K2IntentionTestGenerated extends AbstractK2IntentionTest {
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../../idea/tests/testData/intentions/addMissingClassKeyword")
|
||||
public static class AddMissingClassKeyword extends AbstractK2IntentionTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("abstract.kt")
|
||||
public void testAbstract() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/addMissingClassKeyword/abstract.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("annottion.kt")
|
||||
public void testAnnottion() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/addMissingClassKeyword/annottion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("data.kt")
|
||||
public void testData() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/addMissingClassKeyword/data.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dataHasClassKeyword.kt")
|
||||
public void testDataHasClassKeyword() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/addMissingClassKeyword/dataHasClassKeyword.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enum.kt")
|
||||
public void testEnum() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/addMissingClassKeyword/enum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enumHasClassKeyword.kt")
|
||||
public void testEnumHasClassKeyword() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/addMissingClassKeyword/enumHasClassKeyword.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inner.kt")
|
||||
public void testInner() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/addMissingClassKeyword/inner.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("sealed.kt")
|
||||
public void testSealed() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/addMissingClassKeyword/sealed.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@TestMetadata("../../../idea/tests/testData/intentions/addNameToArgument")
|
||||
public static class AddNameToArgument extends AbstractK2IntentionTest {
|
||||
|
||||
+7
@@ -63,5 +63,12 @@
|
||||
<categoryKey>group.names.kotlin</categoryKey>
|
||||
</intentionAction>
|
||||
|
||||
<intentionAction>
|
||||
<language>kotlin</language>
|
||||
<className>org.jetbrains.kotlin.idea.codeInsight.intentions.shared.AddMissingClassKeywordIntention</className>
|
||||
<bundleName>messages.KotlinBundle</bundleName>
|
||||
<categoryKey>group.names.kotlin</categoryKey>
|
||||
</intentionAction>
|
||||
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
+1
-1
@@ -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.openapi.editor.Editor
|
||||
import com.intellij.psi.PsiDocumentManager
|
||||
@@ -1 +1 @@
|
||||
org.jetbrains.kotlin.idea.intentions.AddMissingClassKeywordIntention
|
||||
org.jetbrains.kotlin.idea.codeInsight.intentions.shared.AddMissingClassKeywordIntention
|
||||
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.codeInsight.intentions.shared.AddMissingClassKeywordIntention
|
||||
@@ -1008,13 +1008,6 @@
|
||||
<categoryKey>group.names.kotlin</categoryKey>
|
||||
</intentionAction>
|
||||
|
||||
<intentionAction>
|
||||
<language>kotlin</language>
|
||||
<className>org.jetbrains.kotlin.idea.intentions.AddMissingClassKeywordIntention</className>
|
||||
<bundleName>messages.KotlinBundle</bundleName>
|
||||
<categoryKey>group.names.kotlin</categoryKey>
|
||||
</intentionAction>
|
||||
|
||||
<intentionAction>
|
||||
<language>kotlin</language>
|
||||
<className>org.jetbrains.kotlin.idea.intentions.ExpandBooleanExpressionIntention</className>
|
||||
|
||||
+1
@@ -12,6 +12,7 @@ internal fun MutableTWorkspace.generateK2IntentionTests() {
|
||||
testGroup("code-insight/intentions-k2/tests", testDataPath = "../../..") {
|
||||
testClass<AbstractK2IntentionTest> {
|
||||
val pattern = Patterns.forRegex("^([\\w\\-_]+)\\.(kt|kts)$")
|
||||
model("${idea}intentions/addMissingClassKeyword", pattern = pattern)
|
||||
model("${idea}intentions/addNameToArgument", pattern = pattern)
|
||||
model("${idea}intentions/addNamesToCallArguments", pattern = pattern)
|
||||
model("${idea}intentions/addNamesToFollowingArguments", pattern = pattern)
|
||||
|
||||
Reference in New Issue
Block a user