diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetConstructorCalleeExpression.java b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetConstructorCalleeExpression.java index 689f198e8a6..ee1f88b425f 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetConstructorCalleeExpression.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/psi/JetConstructorCalleeExpression.java @@ -42,7 +42,7 @@ public class JetConstructorCalleeExpression extends JetExpressionImplStub { + val openMod = if (open) "open " else "" val innerMod = if (inner) "inner " else "" val typeParamList = when (kind) { ClassKind.PLAIN_CLASS, ClassKind.TRAIT -> "<>" else -> "" } psiFactory.createDeclaration( - "$innerMod${kind.keyword} $name$typeParamList$paramList$returnTypeString $classBody" + "$openMod$innerMod${kind.keyword} $name$typeParamList$paramList$returnTypeString $classBody" ) } } diff --git a/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/createClass/CreateClassFromCallWithConstructorCalleeActionFactory.kt b/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/createClass/CreateClassFromCallWithConstructorCalleeActionFactory.kt new file mode 100644 index 00000000000..9a2aa53db96 --- /dev/null +++ b/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/createClass/CreateClassFromCallWithConstructorCalleeActionFactory.kt @@ -0,0 +1,78 @@ +package org.jetbrains.jet.plugin.quickfix.createFromUsage.createClass + +import org.jetbrains.jet.lang.diagnostics.Diagnostic +import com.intellij.codeInsight.intention.IntentionAction +import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache +import org.jetbrains.jet.plugin.quickfix.createFromUsage.callableBuilder.TypeInfo +import org.jetbrains.jet.lang.resolve.BindingContext +import org.jetbrains.jet.lang.types.Variance +import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns +import org.jetbrains.jet.plugin.quickfix.createFromUsage.callableBuilder.ParameterInfo +import org.jetbrains.jet.plugin.quickfix.JetSingleIntentionActionFactory +import org.jetbrains.jet.lang.psi.JetFile +import org.jetbrains.jet.lang.psi.JetAnnotationEntry +import org.jetbrains.jet.lang.psi.JetUserType +import com.intellij.psi.util.PsiTreeUtil +import org.jetbrains.jet.lang.psi.JetDelegatorToSuperCall +import org.jetbrains.jet.lang.psi.JetDelegatorToThisCall +import org.jetbrains.jet.lang.psi.JetCallElement +import org.jetbrains.jet.lang.psi.psiUtil.isAncestor +import org.jetbrains.jet.lang.psi.JetConstructorCalleeExpression +import org.jetbrains.jet.lang.psi.JetSimpleNameExpression +import java.util.Collections + +public object CreateClassFromCallWithConstructorCalleeActionFactory : JetSingleIntentionActionFactory() { + override fun createAction(diagnostic: Diagnostic): IntentionAction? { + val diagElement = diagnostic.getPsiElement() + + val callElement = PsiTreeUtil.getParentOfType( + diagElement, + javaClass(), + javaClass() + ) as? JetCallElement ?: return null + + val isAnnotation = callElement is JetAnnotationEntry + + val callee = callElement.getCalleeExpression() as? JetConstructorCalleeExpression ?: return null + val calleeRef = callee.getConstructorReferenceExpression() ?: return null + + if (!calleeRef.isAncestor(diagElement)) return null + + val file = callElement.getContainingFile() as? JetFile ?: return null + val typeRef = callee.getTypeReference() ?: return null + val userType = typeRef.getTypeElement() as? JetUserType ?: return null + + val context = AnalyzerFacadeWithCache.getContextForElement(userType) + + val qualifier = userType.getQualifier()?.getReferenceExpression() + val qualifierDescriptor = qualifier?.let { context[BindingContext.REFERENCE_TARGET, it] } + + val targetParent = getTargetParentByQualifier(file, qualifier != null, qualifierDescriptor) ?: return null + + val anyType = KotlinBuiltIns.getInstance().getNullableAnyType() + val valueArguments = callElement.getValueArguments() + val defaultParamName = if (valueArguments.size == 1) "value" else null + val parameterInfos = valueArguments.map { + ParameterInfo( + it.getArgumentExpression()?.let { TypeInfo(it, Variance.IN_VARIANCE) } ?: TypeInfo(anyType, Variance.IN_VARIANCE), + it.getArgumentName()?.getReferenceExpression()?.getReferencedName() ?: defaultParamName + ) + } + + val typeArgumentInfos = when { + isAnnotation -> Collections.emptyList() + else -> callElement.getTypeArguments().map { TypeInfo(it.getTypeReference(), Variance.INVARIANT) } + } + + val classInfo = ClassInfo( + kind = if (isAnnotation) ClassKind.ANNOTATION_CLASS else ClassKind.PLAIN_CLASS, + name = calleeRef.getReferencedName(), + targetParent = targetParent, + expectedTypeInfo = TypeInfo.Empty, + parameterInfos = parameterInfos, + open = !isAnnotation, + typeArguments = typeArgumentInfos + ) + return CreateClassFromUsageFix(callElement, classInfo) + } +} \ No newline at end of file diff --git a/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/createClass/CreateClassFromUsageFix.kt b/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/createClass/CreateClassFromUsageFix.kt index cc200c14675..4f31eaffdf2 100644 --- a/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/createClass/CreateClassFromUsageFix.kt +++ b/idea/src/org/jetbrains/jet/plugin/quickfix/createFromUsage/createClass/CreateClassFromUsageFix.kt @@ -53,6 +53,7 @@ public class ClassInfo( val targetParent: PsiElement, val expectedTypeInfo: TypeInfo, val inner: Boolean = false, + val open: Boolean = false, val typeArguments: List = Collections.emptyList(), val parameterInfos: List = Collections.emptyList() ) diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationNoBrackets.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationNoBrackets.kt new file mode 100644 index 00000000000..3d1dd8391f8 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationNoBrackets.kt @@ -0,0 +1,7 @@ +// "Create annotation 'foo'" "true" + +foo(1, "2") fun test() { + +} + +annotation class foo(val i: Int, val s: String) \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationNoParamList.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationNoParamList.kt new file mode 100644 index 00000000000..720a0e3a913 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationNoParamList.kt @@ -0,0 +1,7 @@ +// "Create annotation 'foo'" "true" + +[foo] fun test() { + +} + +annotation class foo \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationNoParams.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationNoParams.kt new file mode 100644 index 00000000000..e7474e9e6f3 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationNoParams.kt @@ -0,0 +1,7 @@ +// "Create annotation 'foo'" "true" + +[foo()] fun test() { + +} + +annotation class foo \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationWithParams.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationWithParams.kt new file mode 100644 index 00000000000..8c71656bee5 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationWithParams.kt @@ -0,0 +1,7 @@ +// "Create annotation 'foo'" "true" + +[foo(1, "2")] fun test() { + +} + +annotation class foo(val i: Int, val s: String) \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationWithTypeParams.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationWithTypeParams.kt new file mode 100644 index 00000000000..8c71656bee5 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterAnnotationWithTypeParams.kt @@ -0,0 +1,7 @@ +// "Create annotation 'foo'" "true" + +[foo(1, "2")] fun test() { + +} + +annotation class foo(val i: Int, val s: String) \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterSingleArgAnnotation.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterSingleArgAnnotation.kt new file mode 100644 index 00000000000..b4f2f1879cc --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterSingleArgAnnotation.kt @@ -0,0 +1,7 @@ +// "Create annotation 'foo'" "true" + +[foo(1)] fun test() { + +} + +annotation class foo(val value: Int) \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterSingleNamedArgAnnotation.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterSingleNamedArgAnnotation.kt new file mode 100644 index 00000000000..9e3833f0b56 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/afterSingleNamedArgAnnotation.kt @@ -0,0 +1,7 @@ +// "Create annotation 'foo'" "true" + +[foo(fooBar = 1)] fun test() { + +} + +annotation class foo(val fooBar: Int) \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoBrackets.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoBrackets.kt new file mode 100644 index 00000000000..a4a81a65367 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoBrackets.kt @@ -0,0 +1,5 @@ +// "Create annotation 'foo'" "true" + +foo(1, "2") fun test() { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoParamList.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoParamList.kt new file mode 100644 index 00000000000..c1277ecd1af --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoParamList.kt @@ -0,0 +1,5 @@ +// "Create annotation 'foo'" "true" + +[foo] fun test() { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoParams.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoParams.kt new file mode 100644 index 00000000000..42a2e331c9e --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoParams.kt @@ -0,0 +1,5 @@ +// "Create annotation 'foo'" "true" + +[foo()] fun test() { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationWithParams.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationWithParams.kt new file mode 100644 index 00000000000..92151baab13 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationWithParams.kt @@ -0,0 +1,5 @@ +// "Create annotation 'foo'" "true" + +[foo(1, "2")] fun test() { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationWithTypeParams.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationWithTypeParams.kt new file mode 100644 index 00000000000..f7a46862d35 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationWithTypeParams.kt @@ -0,0 +1,5 @@ +// "Create annotation 'foo'" "true" + +[foo(1, "2")] fun test() { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeNotAnnotation.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeNotAnnotation.kt new file mode 100644 index 00000000000..7320c5842b0 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeNotAnnotation.kt @@ -0,0 +1,5 @@ +// "Create annotation 'foo'" "false" +// ACTION: Create function 'foo' +// ERROR: Unresolved reference: foo + +fun test() = foo(1, "2") \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeSingleArgAnnotation.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeSingleArgAnnotation.kt new file mode 100644 index 00000000000..1d63b3fad28 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeSingleArgAnnotation.kt @@ -0,0 +1,5 @@ +// "Create annotation 'foo'" "true" + +[foo(1)] fun test() { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeSingleNamedArgAnnotation.kt b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeSingleNamedArgAnnotation.kt new file mode 100644 index 00000000000..aa4d2d9e7c7 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeSingleNamedArgAnnotation.kt @@ -0,0 +1,5 @@ +// "Create annotation 'foo'" "true" + +[foo(fooBar = 1)] fun test() { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallNoReceiver.kt b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallNoReceiver.kt new file mode 100644 index 00000000000..c89db0157c9 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallNoReceiver.kt @@ -0,0 +1,10 @@ +// "Create class 'A'" "true" +package p + +class Foo: A(1, "2") { + +} + +open class A(i: Int, s: String) { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithClassQualifier.kt b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithClassQualifier.kt new file mode 100644 index 00000000000..ac54aa48f38 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithClassQualifier.kt @@ -0,0 +1,14 @@ +// "Create class 'A'" "true" +package p + +class X { + + open class A(i: Int, s: String) { + + } + +} + +class Foo: X.A(1, "2") { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithPackageQualifier.kt b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithPackageQualifier.kt new file mode 100644 index 00000000000..7a355d87816 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithPackageQualifier.kt @@ -0,0 +1,10 @@ +// "Create class 'A'" "true" +package p + +class Foo: p.A(1, "2") { + +} + +open class A(i: Int, s: String) { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithParamNames.kt b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithParamNames.kt new file mode 100644 index 00000000000..0b0e0af42a2 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithParamNames.kt @@ -0,0 +1,14 @@ +// "Create class 'A'" "true" +package p + +class B { + +} + +class Foo: A(abc = 1, ghi = "2", def = B()) { + +} + +open class A(abc: Int, ghi: String, def: B) { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithTypeParams.kt b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithTypeParams.kt new file mode 100644 index 00000000000..3fed372eb5f --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/afterDelegatorToSupercallWithTypeParams.kt @@ -0,0 +1,10 @@ +// "Create class 'A'" "true" +package p + +class Foo: A(1, "2") { + +} + +open class A(t: T, u: U) { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallNoReceiver.kt b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallNoReceiver.kt new file mode 100644 index 00000000000..093e960e7e5 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallNoReceiver.kt @@ -0,0 +1,6 @@ +// "Create class 'A'" "true" +package p + +class Foo: A(1, "2") { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithClassQualifier.kt b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithClassQualifier.kt new file mode 100644 index 00000000000..94137233c19 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithClassQualifier.kt @@ -0,0 +1,10 @@ +// "Create class 'A'" "true" +package p + +class X { + +} + +class Foo: X.A(1, "2") { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithPackageQualifier.kt b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithPackageQualifier.kt new file mode 100644 index 00000000000..2d7c3978054 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithPackageQualifier.kt @@ -0,0 +1,6 @@ +// "Create class 'A'" "true" +package p + +class Foo: p.A(1, "2") { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithParamNames.kt b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithParamNames.kt new file mode 100644 index 00000000000..03fd4152223 --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithParamNames.kt @@ -0,0 +1,10 @@ +// "Create class 'A'" "true" +package p + +class B { + +} + +class Foo: A(abc = 1, ghi = "2", def = B()) { + +} \ No newline at end of file diff --git a/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithTypeParams.kt b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithTypeParams.kt new file mode 100644 index 00000000000..9e921c3e60e --- /dev/null +++ b/idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithTypeParams.kt @@ -0,0 +1,6 @@ +// "Create class 'A'" "true" +package p + +class Foo: A(1, "2") { + +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixTestGenerated.java b/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixTestGenerated.java index e63e731e4a3..06b2d768bc9 100644 --- a/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixTestGenerated.java @@ -628,13 +628,70 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("idea/testData/quickfix/createFromUsage/createClass") @TestDataPath("$PROJECT_ROOT") - @InnerTestClasses({CreateClass.CallExpression.class, CreateClass.DelegationSpecifier.class, CreateClass.ImportDirective.class, CreateClass.ReferenceExpression.class, CreateClass.TypeReference.class}) + @InnerTestClasses({CreateClass.AnnotationEntry.class, CreateClass.CallExpression.class, CreateClass.DelegationSpecifier.class, CreateClass.ImportDirective.class, CreateClass.ReferenceExpression.class, CreateClass.TypeReference.class}) @RunWith(JUnit3RunnerWithInners.class) public static class CreateClass extends AbstractQuickFixTest { public void testAllFilesPresentInCreateClass() throws Exception { JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass"), Pattern.compile("^before(\\w+)\\.kt$"), true); } + @TestMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AnnotationEntry extends AbstractQuickFixTest { + public void testAllFilesPresentInAnnotationEntry() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/annotationEntry"), Pattern.compile("^before(\\w+)\\.kt$"), true); + } + + @TestMetadata("beforeAnnotationNoBrackets.kt") + public void testAnnotationNoBrackets() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoBrackets.kt"); + doTest(fileName); + } + + @TestMetadata("beforeAnnotationNoParamList.kt") + public void testAnnotationNoParamList() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoParamList.kt"); + doTest(fileName); + } + + @TestMetadata("beforeAnnotationNoParams.kt") + public void testAnnotationNoParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationNoParams.kt"); + doTest(fileName); + } + + @TestMetadata("beforeAnnotationWithParams.kt") + public void testAnnotationWithParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationWithParams.kt"); + doTest(fileName); + } + + @TestMetadata("beforeAnnotationWithTypeParams.kt") + public void testAnnotationWithTypeParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeAnnotationWithTypeParams.kt"); + doTest(fileName); + } + + @TestMetadata("beforeNotAnnotation.kt") + public void testNotAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeNotAnnotation.kt"); + doTest(fileName); + } + + @TestMetadata("beforeSingleArgAnnotation.kt") + public void testSingleArgAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeSingleArgAnnotation.kt"); + doTest(fileName); + } + + @TestMetadata("beforeSingleNamedArgAnnotation.kt") + public void testSingleNamedArgAnnotation() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/beforeSingleNamedArgAnnotation.kt"); + doTest(fileName); + } + } + @TestMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression") @TestDataPath("$PROJECT_ROOT") @InnerTestClasses({CallExpression.TypeArguments.class}) @@ -914,6 +971,36 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { doTest(fileName); } + @TestMetadata("beforeDelegatorToSupercallNoReceiver.kt") + public void testDelegatorToSupercallNoReceiver() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallNoReceiver.kt"); + doTest(fileName); + } + + @TestMetadata("beforeDelegatorToSupercallWithClassQualifier.kt") + public void testDelegatorToSupercallWithClassQualifier() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithClassQualifier.kt"); + doTest(fileName); + } + + @TestMetadata("beforeDelegatorToSupercallWithPackageQualifier.kt") + public void testDelegatorToSupercallWithPackageQualifier() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithPackageQualifier.kt"); + doTest(fileName); + } + + @TestMetadata("beforeDelegatorToSupercallWithParamNames.kt") + public void testDelegatorToSupercallWithParamNames() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithParamNames.kt"); + doTest(fileName); + } + + @TestMetadata("beforeDelegatorToSupercallWithTypeParams.kt") + public void testDelegatorToSupercallWithTypeParams() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeDelegatorToSupercallWithTypeParams.kt"); + doTest(fileName); + } + @TestMetadata("beforeTraitDelegatorToSuperclass.kt") public void testTraitDelegatorToSuperclass() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/beforeTraitDelegatorToSuperclass.kt");