diff options
author | Nikolay Krasko <nikolay.krasko@jetbrains.com> | 2020-08-31 20:15:39 +0300 |
---|---|---|
committer | Nikolay Krasko <nikolay.krasko@jetbrains.com> | 2020-09-01 17:43:31 +0300 |
commit | 32e21cf7a0626bd4b089e0df41ac180d475be719 (patch) | |
tree | 5aaa4c40de23562bf64395d861b732ed936adcfe | |
parent | 1c3af648f578cac12eb6a15e33a44a0aa7e8b8f5 (diff) | |
download | kotlin-32e21cf7a0626bd4b089e0df41ac180d475be719.tar.gz |
as42: Apply 201 <-> AS41 diff
33 files changed, 1742 insertions, 0 deletions
diff --git a/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/AndroidJpsBuildTestCase.java.as42 b/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/AndroidJpsBuildTestCase.java.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/AndroidJpsBuildTestCase.java.as42 diff --git a/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/AndroidRunner.java.as42 b/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/AndroidRunner.java.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/compiler/android-tests/tests/org/jetbrains/kotlin/android/tests/AndroidRunner.java.as42 diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as42 b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as42 new file mode 100644 index 00000000000..3414ed8fbf0 --- /dev/null +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt.as42 @@ -0,0 +1,1223 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.generators.tests + +import org.jetbrains.kotlin.AbstractDataFlowValueRenderingTest +import org.jetbrains.kotlin.addImport.AbstractAddImportTest +import org.jetbrains.kotlin.allopen.AbstractBytecodeListingTestForAllOpen +import org.jetbrains.kotlin.android.parcel.AbstractParcelBytecodeListingTest +import org.jetbrains.kotlin.android.synthetic.test.AbstractAndroidBoxTest +import org.jetbrains.kotlin.android.synthetic.test.AbstractAndroidBytecodeShapeTest +import org.jetbrains.kotlin.android.synthetic.test.AbstractAndroidSyntheticPropertyDescriptorTest +import org.jetbrains.kotlin.checkers.* +import org.jetbrains.kotlin.copyright.AbstractUpdateKotlinCopyrightTest +import org.jetbrains.kotlin.findUsages.AbstractFindUsagesTest +import org.jetbrains.kotlin.findUsages.AbstractKotlinFindUsagesWithLibraryTest +import org.jetbrains.kotlin.formatter.AbstractFormatterTest +import org.jetbrains.kotlin.formatter.AbstractTypingIndentationTestBase +import org.jetbrains.kotlin.generators.tests.generator.TestGroup +import org.jetbrains.kotlin.generators.tests.generator.muteExtraSuffix +import org.jetbrains.kotlin.generators.tests.generator.testGroup +import org.jetbrains.kotlin.generators.util.KT_OR_KTS +import org.jetbrains.kotlin.generators.util.KT_OR_KTS_WITHOUT_DOTS_IN_NAME +import org.jetbrains.kotlin.generators.util.KT_WITHOUT_DOTS_IN_NAME +import org.jetbrains.kotlin.idea.AbstractExpressionSelectionTest +import org.jetbrains.kotlin.idea.index.AbstractKotlinTypeAliasByExpansionShortNameIndexTest +import org.jetbrains.kotlin.idea.AbstractSmartSelectionTest +import org.jetbrains.kotlin.idea.actions.AbstractGotoTestOrCodeActionTest +import org.jetbrains.kotlin.idea.caches.resolve.* +import org.jetbrains.kotlin.idea.codeInsight.* +import org.jetbrains.kotlin.idea.codeInsight.generate.AbstractCodeInsightActionTest +import org.jetbrains.kotlin.idea.codeInsight.generate.AbstractGenerateHashCodeAndEqualsActionTest +import org.jetbrains.kotlin.idea.codeInsight.generate.AbstractGenerateTestSupportMethodActionTest +import org.jetbrains.kotlin.idea.codeInsight.generate.AbstractGenerateToStringActionTest +import org.jetbrains.kotlin.idea.codeInsight.moveUpDown.AbstractMoveLeftRightTest +import org.jetbrains.kotlin.idea.codeInsight.moveUpDown.AbstractMoveStatementTest +import org.jetbrains.kotlin.idea.codeInsight.postfix.AbstractPostfixTemplateProviderTest +import org.jetbrains.kotlin.idea.codeInsight.surroundWith.AbstractSurroundWithTest +import org.jetbrains.kotlin.idea.codeInsight.unwrap.AbstractUnwrapRemoveTest +import org.jetbrains.kotlin.idea.completion.test.* +import org.jetbrains.kotlin.idea.completion.test.handlers.AbstractBasicCompletionHandlerTest +import org.jetbrains.kotlin.idea.completion.test.handlers.AbstractCompletionCharFilterTest +import org.jetbrains.kotlin.idea.completion.test.handlers.AbstractKeywordCompletionHandlerTest +import org.jetbrains.kotlin.idea.completion.test.handlers.AbstractSmartCompletionHandlerTest +import org.jetbrains.kotlin.idea.completion.test.weighers.AbstractBasicCompletionWeigherTest +import org.jetbrains.kotlin.idea.completion.test.weighers.AbstractSmartCompletionWeigherTest +import org.jetbrains.kotlin.idea.configuration.AbstractGradleConfigureProjectByChangingFileTest +import org.jetbrains.kotlin.idea.conversion.copy.AbstractJavaToKotlinCopyPasteConversionTest +import org.jetbrains.kotlin.idea.conversion.copy.AbstractLiteralKotlinToKotlinCopyPasteTest +import org.jetbrains.kotlin.idea.conversion.copy.AbstractLiteralTextToKotlinCopyPasteTest +import org.jetbrains.kotlin.idea.conversion.copy.AbstractTextJavaToKotlinCopyPasteConversionTest +import org.jetbrains.kotlin.idea.coverage.AbstractKotlinCoverageOutputFilesTest +import org.jetbrains.kotlin.idea.debugger.evaluate.* +import org.jetbrains.kotlin.idea.debugger.test.sequence.exec.AbstractSequenceTraceTestCase +import org.jetbrains.kotlin.idea.debugger.test.* +import org.jetbrains.kotlin.idea.debugger.test.AbstractFileRankingTest +import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest +import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest +import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS +import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateJavaToLibrarySourceTest +import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractClsStubBuilderTest +import org.jetbrains.kotlin.idea.decompiler.stubBuilder.AbstractLoadJavaClsStubTest +import org.jetbrains.kotlin.idea.decompiler.textBuilder.AbstractCommonDecompiledTextFromJsMetadataTest +import org.jetbrains.kotlin.idea.decompiler.textBuilder.AbstractCommonDecompiledTextTest +import org.jetbrains.kotlin.idea.decompiler.textBuilder.AbstractJsDecompiledTextFromJsMetadataTest +import org.jetbrains.kotlin.idea.decompiler.textBuilder.AbstractJvmDecompiledTextTest +import org.jetbrains.kotlin.idea.editor.AbstractMultiLineStringIndentTest +import org.jetbrains.kotlin.idea.editor.backspaceHandler.AbstractBackspaceHandlerTest +import org.jetbrains.kotlin.idea.editor.quickDoc.AbstractQuickDocProviderTest +import org.jetbrains.kotlin.idea.filters.AbstractKotlinExceptionFilterTest +import org.jetbrains.kotlin.idea.folding.AbstractKotlinFoldingTest +import org.jetbrains.kotlin.idea.hierarchy.AbstractHierarchyTest +import org.jetbrains.kotlin.idea.hierarchy.AbstractHierarchyWithLibTest +import org.jetbrains.kotlin.idea.highlighter.* +import org.jetbrains.kotlin.idea.imports.AbstractJsOptimizeImportsTest +import org.jetbrains.kotlin.idea.imports.AbstractJvmOptimizeImportsTest +import org.jetbrains.kotlin.idea.inspections.AbstractLocalInspectionTest +import org.jetbrains.kotlin.idea.inspections.AbstractMultiFileLocalInspectionTest +import org.jetbrains.kotlin.idea.intentions.AbstractConcatenatedStringGeneratorTest +import org.jetbrains.kotlin.idea.intentions.AbstractIntentionTest +import org.jetbrains.kotlin.idea.intentions.AbstractIntentionTest2 +import org.jetbrains.kotlin.idea.intentions.AbstractMultiFileIntentionTest +import org.jetbrains.kotlin.idea.intentions.declarations.AbstractJoinLinesTest +import org.jetbrains.kotlin.idea.internal.AbstractBytecodeToolWindowTest +import org.jetbrains.kotlin.idea.kdoc.AbstractKDocHighlightingTest +import org.jetbrains.kotlin.idea.kdoc.AbstractKDocTypingTest +import org.jetbrains.kotlin.idea.navigation.* +import org.jetbrains.kotlin.idea.parameterInfo.AbstractParameterInfoTest +import org.jetbrains.kotlin.idea.quickfix.AbstractQuickFixMultiFileTest +import org.jetbrains.kotlin.idea.quickfix.AbstractQuickFixMultiModuleTest +import org.jetbrains.kotlin.idea.quickfix.AbstractQuickFixTest +import org.jetbrains.kotlin.idea.refactoring.AbstractNameSuggestionProviderTest +import org.jetbrains.kotlin.idea.refactoring.copy.AbstractCopyTest +import org.jetbrains.kotlin.idea.refactoring.copy.AbstractMultiModuleCopyTest +import org.jetbrains.kotlin.idea.refactoring.inline.AbstractInlineTest +import org.jetbrains.kotlin.idea.refactoring.introduce.AbstractExtractionTest +import org.jetbrains.kotlin.idea.refactoring.move.AbstractMoveTest +import org.jetbrains.kotlin.idea.refactoring.move.AbstractMultiModuleMoveTest +import org.jetbrains.kotlin.idea.refactoring.pullUp.AbstractPullUpTest +import org.jetbrains.kotlin.idea.refactoring.pushDown.AbstractPushDownTest +import org.jetbrains.kotlin.idea.refactoring.rename.AbstractMultiModuleRenameTest +import org.jetbrains.kotlin.idea.refactoring.rename.AbstractRenameTest +import org.jetbrains.kotlin.idea.refactoring.safeDelete.AbstractMultiModuleSafeDeleteTest +import org.jetbrains.kotlin.idea.refactoring.safeDelete.AbstractSafeDeleteTest +import org.jetbrains.kotlin.idea.repl.AbstractIdeReplCompletionTest +import org.jetbrains.kotlin.idea.resolve.* +import org.jetbrains.kotlin.idea.scratch.AbstractScratchLineMarkersTest +import org.jetbrains.kotlin.idea.scratch.AbstractScratchRunActionTest +import org.jetbrains.kotlin.idea.script.AbstractScriptConfigurationCompletionTest +import org.jetbrains.kotlin.idea.script.AbstractScriptConfigurationHighlightingTest +import org.jetbrains.kotlin.idea.script.AbstractScriptConfigurationNavigationTest +import org.jetbrains.kotlin.idea.script.AbstractScriptDefinitionsOrderTest +import org.jetbrains.kotlin.idea.slicer.AbstractSlicerLeafGroupingTest +import org.jetbrains.kotlin.idea.slicer.AbstractSlicerNullnessGroupingTest +import org.jetbrains.kotlin.idea.slicer.AbstractSlicerTreeTest +import org.jetbrains.kotlin.idea.slicer.AbstractSlicerMultiplatformTest +import org.jetbrains.kotlin.idea.structureView.AbstractKotlinFileStructureTest +import org.jetbrains.kotlin.idea.stubs.AbstractMultiFileHighlightingTest +import org.jetbrains.kotlin.idea.stubs.AbstractResolveByStubTest +import org.jetbrains.kotlin.idea.stubs.AbstractStubBuilderTest +import org.jetbrains.kotlin.incremental.* +import org.jetbrains.kotlin.j2k.AbstractJavaToKotlinConverterForWebDemoTest +import org.jetbrains.kotlin.j2k.AbstractJavaToKotlinConverterMultiFileTest +import org.jetbrains.kotlin.j2k.AbstractJavaToKotlinConverterSingleFileTest +//import org.jetbrains.kotlin.jps.build.* +//import org.jetbrains.kotlin.jps.incremental.AbstractJsProtoComparisonTest +//import org.jetbrains.kotlin.jps.incremental.AbstractJvmProtoComparisonTest +import org.jetbrains.kotlin.kapt.cli.test.AbstractArgumentParsingTest +import org.jetbrains.kotlin.kapt.cli.test.AbstractKaptToolIntegrationTest +import org.jetbrains.kotlin.kapt3.test.AbstractClassFileToSourceStubConverterTest +import org.jetbrains.kotlin.kapt3.test.AbstractKotlinKaptContextTest +import org.jetbrains.kotlin.nj2k.AbstractNewJavaToKotlinConverterMultiFileTest +import org.jetbrains.kotlin.nj2k.AbstractNewJavaToKotlinConverterSingleFileTest +import org.jetbrains.kotlin.nj2k.AbstractNewJavaToKotlinCopyPasteConversionTest +import org.jetbrains.kotlin.nj2k.AbstractTextNewJavaToKotlinCopyPasteConversionTest +import org.jetbrains.kotlin.nj2k.inference.common.AbstractCommonConstraintCollectorTest +import org.jetbrains.kotlin.nj2k.inference.mutability.AbstractMutabilityInferenceTest +import org.jetbrains.kotlin.nj2k.inference.nullability.AbstractNullabilityInferenceTest +import org.jetbrains.kotlin.noarg.AbstractBlackBoxCodegenTestForNoArg +import org.jetbrains.kotlin.noarg.AbstractBytecodeListingTestForNoArg +import org.jetbrains.kotlin.psi.patternMatching.AbstractPsiUnifierTest +import org.jetbrains.kotlin.samWithReceiver.AbstractSamWithReceiverScriptTest +import org.jetbrains.kotlin.samWithReceiver.AbstractSamWithReceiverTest +import org.jetbrains.kotlin.search.AbstractAnnotatedMembersSearchTest +import org.jetbrains.kotlin.search.AbstractInheritorsSearchTest +import org.jetbrains.kotlin.shortenRefs.AbstractShortenRefsTest +import org.jetbrains.kotlin.test.TargetBackend +import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginBytecodeListingTest +import org.jetbrains.kotlinx.serialization.AbstractSerializationPluginDiagnosticTest +import org.jetbrains.kotlinx.serialization.AbstractSerializationIrBytecodeListingTest + +fun main(args: Array<String>) { + System.setProperty("java.awt.headless", "true") + + testGroup("idea/jvm-debugger/jvm-debugger-test/test", "idea/jvm-debugger/jvm-debugger-test/testData") { + testClass<AbstractKotlinSteppingTest> { + model( + "stepping/stepIntoAndSmartStepInto", + pattern = KT_WITHOUT_DOTS_IN_NAME, + testMethod = "doStepIntoTest", + testClassName = "StepInto" + ) + model( + "stepping/stepIntoAndSmartStepInto", + pattern = KT_WITHOUT_DOTS_IN_NAME, + testMethod = "doSmartStepIntoTest", + testClassName = "SmartStepInto" + ) + model( + "stepping/stepInto", + pattern = KT_WITHOUT_DOTS_IN_NAME, + testMethod = "doStepIntoTest", + testClassName = "StepIntoOnly" + ) + model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest") + model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest") + model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest") + model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest") + } + + testClass<AbstractKotlinEvaluateExpressionTest> { + model("evaluation/singleBreakpoint", testMethod = "doSingleBreakpointTest") + model("evaluation/multipleBreakpoints", testMethod = "doMultipleBreakpointsTest") + } + + testClass<AbstractSelectExpressionForDebuggerTest> { + model("selectExpression", recursive = false) + model("selectExpression/disallowMethodCalls", testMethod = "doTestWoMethodCalls") + } + + testClass<AbstractPositionManagerTest> { + model("positionManager", recursive = false, extension = "kt", testClassName = "SingleFile") + model("positionManager", recursive = false, extension = null, testClassName = "MultiFile") + } + + testClass<AbstractSmartStepIntoTest> { + model("smartStepInto") + } + + testClass<AbstractBreakpointApplicabilityTest> { + model("breakpointApplicability") + } + + testClass<AbstractFileRankingTest> { + model("fileRanking") + } + + testClass<AbstractAsyncStackTraceTest> { + model("asyncStackTrace") + } + + testClass<AbstractSequenceTraceTestCase> { + // TODO: implement mapping logic for terminal operations + model("sequence/streams/sequence", excludeDirs = listOf("terminal")) + } + } + + testGroup("idea/tests", "idea/testData") { + testClass<AbstractAdditionalResolveDescriptorRendererTest> { + model("resolve/additionalLazyResolve") + } + + testClass<AbstractPartialBodyResolveTest> { + model("resolve/partialBodyResolve") + } + + testClass<AbstractPsiCheckerTest> { + model("checker", recursive = false) + model("checker/regression") + model("checker/recovery") + model("checker/rendering") + model("checker/scripts", extension = "kts") + model("checker/duplicateJvmSignature") + model("checker/infos", testMethod = "doTestWithInfos") + model("checker/diagnosticsMessage") + } + + testClass<AbstractJavaAgainstKotlinSourceCheckerTest> { + model("kotlinAndJavaChecker/javaAgainstKotlin") + model("kotlinAndJavaChecker/javaWithKotlin") + } + + testClass<AbstractJavaAgainstKotlinBinariesCheckerTest> { + model("kotlinAndJavaChecker/javaAgainstKotlin") + } + + testClass<AbstractPsiUnifierTest> { + model("unifier") + } + + testClass<AbstractCodeFragmentHighlightingTest> { + model("checker/codeFragments", extension = "kt", recursive = false) + model("checker/codeFragments/imports", testMethod = "doTestWithImport", extension = "kt") + } + + testClass<AbstractCodeFragmentAutoImportTest> { + model("quickfix.special/codeFragmentAutoImport", extension = "kt", recursive = false) + } + + testClass<AbstractJsCheckerTest> { + model("checker/js") + } + + testClass<AbstractQuickFixTest> { + model("quickfix", pattern = "^([\\w\\-_]+)\\.kt$", filenameStartsLowerCase = true) + } + + testClass<AbstractGotoSuperTest> { + model("navigation/gotoSuper", extension = "test", recursive = false) + } + + testClass<AbstractGotoTypeDeclarationTest> { + model("navigation/gotoTypeDeclaration", extension = "test") + } + + testClass<AbstractGotoDeclarationTest> { + model("navigation/gotoDeclaration", extension = "test") + } + + testClass<AbstractParameterInfoTest> { + model( + "parameterInfo", + pattern = "^([\\w\\-_]+)\\.kt$", recursive = true, + excludeDirs = listOf("withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib") + ) + } + + testClass<AbstractKotlinGotoTest> { + model("navigation/gotoClass", testMethod = "doClassTest") + model("navigation/gotoSymbol", testMethod = "doSymbolTest") + } + + testClass<AbstractNavigateToLibrarySourceTest>(annotations = listOf(muteExtraSuffix(".libsrc"))) { + model("decompiler/navigation/usercode") + } + + testClass<AbstractNavigateJavaToLibrarySourceTest>(annotations = listOf(muteExtraSuffix(".libsrc"))) { + model("decompiler/navigation/userJavaCode", pattern = "^(.+)\\.java$") + } + + testClass<AbstractNavigateToLibrarySourceTestWithJS>(annotations = listOf(muteExtraSuffix(".libsrcjs"))) { + model("decompiler/navigation/usercode", testClassName ="UsercodeWithJSModule") + } + + testClass<AbstractNavigateToDecompiledLibraryTest> { + model("decompiler/navigation/usercode") + } + + testClass<AbstractKotlinGotoImplementationTest> { + model("navigation/implementations", recursive = false) + } + + testClass<AbstractGotoTestOrCodeActionTest> { + model("navigation/gotoTestOrCode", pattern = "^(.+)\\.main\\..+\$") + } + + testClass<AbstractInheritorsSearchTest> { + model("search/inheritance") + } + + testClass<AbstractAnnotatedMembersSearchTest> { + model("search/annotations") + } + + testClass<AbstractQuickFixMultiFileTest> { + model("quickfix", pattern = """^(\w+)\.((before\.Main\.\w+)|(test))$""", testMethod = "doTestWithExtraFile") + } + + testClass<AbstractKotlinTypeAliasByExpansionShortNameIndexTest> { + model("typealiasExpansionIndex") + } + + testClass<AbstractHighlightingTest> { + model("highlighter") + } + + testClass<AbstractDslHighlighterTest> { + model("dslHighlighter") + } + + testClass<AbstractUsageHighlightingTest> { + model("usageHighlighter") + } + + testClass<AbstractKotlinFoldingTest> { + model("folding/noCollapse") + model("folding/checkCollapse", testMethod = "doSettingsFoldingTest") + } + + testClass<AbstractSurroundWithTest> { + model("codeInsight/surroundWith/if", testMethod = "doTestWithIfSurrounder") + model("codeInsight/surroundWith/ifElse", testMethod = "doTestWithIfElseSurrounder") + model("codeInsight/surroundWith/ifElseExpression", testMethod = "doTestWithIfElseExpressionSurrounder") + model("codeInsight/surroundWith/ifElseExpressionBraces", testMethod = "doTestWithIfElseExpressionBracesSurrounder") + model("codeInsight/surroundWith/not", testMethod = "doTestWithNotSurrounder") + model("codeInsight/surroundWith/parentheses", testMethod = "doTestWithParenthesesSurrounder") + model("codeInsight/surroundWith/stringTemplate", testMethod = "doTestWithStringTemplateSurrounder") + model("codeInsight/surroundWith/when", testMethod = "doTestWithWhenSurrounder") + model("codeInsight/surroundWith/tryCatch", testMethod = "doTestWithTryCatchSurrounder") + model("codeInsight/surroundWith/tryCatchExpression", testMethod = "doTestWithTryCatchExpressionSurrounder") + model("codeInsight/surroundWith/tryCatchFinally", testMethod = "doTestWithTryCatchFinallySurrounder") + model("codeInsight/surroundWith/tryCatchFinallyExpression", testMethod = "doTestWithTryCatchFinallyExpressionSurrounder") + model("codeInsight/surroundWith/tryFinally", testMethod = "doTestWithTryFinallySurrounder") + model("codeInsight/surroundWith/functionLiteral", testMethod = "doTestWithFunctionLiteralSurrounder") + model("codeInsight/surroundWith/withIfExpression", testMethod = "doTestWithSurroundWithIfExpression") + model("codeInsight/surroundWith/withIfElseExpression", testMethod = "doTestWithSurroundWithIfElseExpression") + } + + testClass<AbstractJoinLinesTest> { + model("joinLines") + } + + testClass<AbstractBreadcrumbsTest> { + model("codeInsight/breadcrumbs") + } + + testClass<AbstractIntentionTest> { + model("intentions", pattern = "^([\\w\\-_]+)\\.(kt|kts)$") + } + + testClass<AbstractIntentionTest2> { + model("intentions/loopToCallChain", pattern = "^([\\w\\-_]+)\\.kt$") + } + + testClass<AbstractConcatenatedStringGeneratorTest> { + model("concatenatedStringGenerator", pattern = "^([\\w\\-_]+)\\.kt$") + } + + testClass<AbstractInspectionTest> { + model("intentions", pattern = "^(inspections\\.test)$", singleClass = true) + model("inspections", pattern = "^(inspections\\.test)$", singleClass = true) + model("inspectionsLocal", pattern = "^(inspections\\.test)$", singleClass = true) + } + + testClass<AbstractLocalInspectionTest> { + model("inspectionsLocal", pattern = "^([\\w\\-_]+)\\.(kt|kts)$") + } + + testClass<AbstractHierarchyTest> { + model("hierarchy/class/type", extension = null, recursive = false, testMethod = "doTypeClassHierarchyTest") + model("hierarchy/class/super", extension = null, recursive = false, testMethod = "doSuperClassHierarchyTest") + model("hierarchy/class/sub", extension = null, recursive = false, testMethod = "doSubClassHierarchyTest") + model("hierarchy/calls/callers", extension = null, recursive = false, testMethod = "doCallerHierarchyTest") + model("hierarchy/calls/callersJava", extension = null, recursive = false, testMethod = "doCallerJavaHierarchyTest") + model("hierarchy/calls/callees", extension = null, recursive = false, testMethod = "doCalleeHierarchyTest") + model("hierarchy/overrides", extension = null, recursive = false, testMethod = "doOverrideHierarchyTest") + } + + testClass<AbstractHierarchyWithLibTest> { + model("hierarchy/withLib", extension = null, recursive = false) + } + + testClass<AbstractMoveStatementTest> { + model("codeInsight/moveUpDown/classBodyDeclarations", pattern = KT_OR_KTS, testMethod = "doTestClassBodyDeclaration") + model("codeInsight/moveUpDown/closingBraces", testMethod = "doTestExpression") + model("codeInsight/moveUpDown/expressions", pattern = KT_OR_KTS, testMethod = "doTestExpression") + model("codeInsight/moveUpDown/parametersAndArguments", testMethod = "doTestExpression") + model("codeInsight/moveUpDown/trailingComma", testMethod = "doTestExpressionWithTrailingComma") + } + + testClass<AbstractMoveLeftRightTest> { + model("codeInsight/moveLeftRight") + } + + testClass<AbstractInlineTest> { + model("refactoring/inline", pattern = "^(\\w+)\\.kt$") + } + + testClass<AbstractUnwrapRemoveTest> { + model("codeInsight/unwrapAndRemove/removeExpression", testMethod = "doTestExpressionRemover") + model("codeInsight/unwrapAndRemove/unwrapThen", testMethod = "doTestThenUnwrapper") + model("codeInsight/unwrapAndRemove/unwrapElse", testMethod = "doTestElseUnwrapper") + model("codeInsight/unwrapAndRemove/removeElse", testMethod = "doTestElseRemover") + model("codeInsight/unwrapAndRemove/unwrapLoop", testMethod = "doTestLoopUnwrapper") + model("codeInsight/unwrapAndRemove/unwrapTry", testMethod = "doTestTryUnwrapper") + model("codeInsight/unwrapAndRemove/unwrapCatch", testMethod = "doTestCatchUnwrapper") + model("codeInsight/unwrapAndRemove/removeCatch", testMethod = "doTestCatchRemover") + model("codeInsight/unwrapAndRemove/unwrapFinally", testMethod = "doTestFinallyUnwrapper") + model("codeInsight/unwrapAndRemove/removeFinally", testMethod = "doTestFinallyRemover") + model("codeInsight/unwrapAndRemove/unwrapLambda", testMethod = "doTestLambdaUnwrapper") + model("codeInsight/unwrapAndRemove/unwrapFunctionParameter", testMethod = "doTestFunctionParameterUnwrapper") + } + + testClass<AbstractExpressionTypeTest> { + model("codeInsight/expressionType") + } + + testClass<AbstractBackspaceHandlerTest> { + model("editor/backspaceHandler") + } + + testClass<AbstractMultiLineStringIndentTest> { + model("editor/enterHandler/multilineString") + } + + testClass<AbstractQuickDocProviderTest> { + model("editor/quickDoc", pattern = """^([^_]+)\.(kt|java)$""") + } + + testClass<AbstractSafeDeleteTest> { + model("refactoring/safeDelete/deleteClass/kotlinClass", testMethod = "doClassTest") + model("refactoring/safeDelete/deleteClass/kotlinClassWithJava", testMethod = "doClassTestWithJava") + model("refactoring/safeDelete/deleteClass/javaClassWithKotlin", extension = "java", testMethod = "doJavaClassTest") + model("refactoring/safeDelete/deleteObject/kotlinObject", testMethod = "doObjectTest") + model("refactoring/safeDelete/deleteFunction/kotlinFunction", testMethod = "doFunctionTest") + model("refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava", testMethod = "doFunctionTestWithJava") + model("refactoring/safeDelete/deleteFunction/javaFunctionWithKotlin", testMethod = "doJavaMethodTest") + model("refactoring/safeDelete/deleteProperty/kotlinProperty", testMethod = "doPropertyTest") + model("refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava", testMethod = "doPropertyTestWithJava") + model("refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin", testMethod = "doJavaPropertyTest") + model("refactoring/safeDelete/deleteTypeAlias/kotlinTypeAlias", testMethod = "doTypeAliasTest") + model("refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter", testMethod = "doTypeParameterTest") + model("refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava", testMethod = "doTypeParameterTestWithJava") + model("refactoring/safeDelete/deleteValueParameter/kotlinValueParameter", testMethod = "doValueParameterTest") + model("refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava", testMethod = "doValueParameterTestWithJava") + } + + testClass<AbstractReferenceResolveTest> { + model("resolve/references", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractReferenceResolveInJavaTest> { + model("resolve/referenceInJava/binaryAndSource", extension = "java") + model("resolve/referenceInJava/sourceOnly", extension = "java") + } + + testClass<AbstractReferenceToCompiledKotlinResolveInJavaTest> { + model("resolve/referenceInJava/binaryAndSource", extension = "java") + } + + testClass<AbstractReferenceResolveWithLibTest> { + model("resolve/referenceWithLib", recursive = false) + } + + testClass<AbstractReferenceResolveInLibrarySourcesTest> { + model("resolve/referenceInLib", recursive = false) + } + + testClass<AbstractReferenceToJavaWithWrongFileStructureTest> { + model("resolve/referenceToJavaWithWrongFileStructure", recursive = false) + } + + testClass<AbstractFindUsagesTest> { + model("findUsages/kotlin", pattern = """^(.+)\.0\.(kt|kts)$""") + model("findUsages/java", pattern = """^(.+)\.0\.java$""") + model("findUsages/propertyFiles", pattern = """^(.+)\.0\.properties$""") + } + + testClass<AbstractKotlinFindUsagesWithLibraryTest> { + model("findUsages/libraryUsages", pattern = """^(.+)\.0\.kt$""") + } + + testClass<AbstractMoveTest> { + model("refactoring/move", extension = "test", singleClass = true) + } + + testClass<AbstractCopyTest> { + model("refactoring/copy", extension = "test", singleClass = true) + } + + testClass<AbstractMultiModuleMoveTest> { + model("refactoring/moveMultiModule", extension = "test", singleClass = true) + } + + testClass<AbstractMultiModuleCopyTest> { + model("refactoring/copyMultiModule", extension = "test", singleClass = true) + } + + testClass<AbstractMultiModuleSafeDeleteTest> { + model("refactoring/safeDeleteMultiModule", extension = "test", singleClass = true) + } + + testClass<AbstractMultiFileIntentionTest> { + model("multiFileIntentions", extension = "test", singleClass = true, filenameStartsLowerCase = true) + } + + testClass<AbstractMultiFileLocalInspectionTest> { + model("multiFileLocalInspections", extension = "test", singleClass = true, filenameStartsLowerCase = true) + } + + testClass<AbstractMultiFileInspectionTest> { + model("multiFileInspections", extension = "test", singleClass = true) + } + + testClass<AbstractFormatterTest> { + model("formatter", pattern = """^([^\.]+)\.after\.kt.*$""") + model( + "formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.kt.*$""", + testMethod = "doTestCallSite", testClassName = "FormatterCallSite" + ) + model( + "formatter", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", + testMethod = "doTestInverted", testClassName = "FormatterInverted" + ) + model( + "formatter/trailingComma", pattern = """^([^\.]+)\.call\.after\.inv\.kt.*$""", + testMethod = "doTestInvertedCallSite", testClassName = "FormatterInvertedCallSite" + ) + } + + testClass<AbstractTypingIndentationTestBase> { + model("indentationOnNewline", pattern = """^([^\.]+)\.after\.kt.*$""", testMethod = "doNewlineTest", + testClassName = "DirectSettings") + model("indentationOnNewline", pattern = """^([^\.]+)\.after\.inv\.kt.*$""", testMethod = "doNewlineTestWithInvert", + testClassName = "InvertedSettings") + } + + testClass<AbstractDiagnosticMessageTest> { + model("diagnosticMessage", recursive = false) + } + + testClass<AbstractDiagnosticMessageJsTest> { + model("diagnosticMessage/js", recursive = false, targetBackend = TargetBackend.JS) + } + + testClass<AbstractRenameTest> { + model("refactoring/rename", extension = "test", singleClass = true) + } + + testClass<AbstractMultiModuleRenameTest> { + model("refactoring/renameMultiModule", extension = "test", singleClass = true) + } + + testClass<AbstractOutOfBlockModificationTest> { + model("codeInsight/outOfBlock", pattern = KT_OR_KTS) + } + + testClass<AbstractDataFlowValueRenderingTest> { + model("dataFlowValueRendering") + } + + testClass<AbstractJavaToKotlinCopyPasteConversionTest> { + model("copyPaste/conversion", pattern = """^([^\.]+)\.java$""") + } + + testClass<AbstractTextJavaToKotlinCopyPasteConversionTest> { + model("copyPaste/plainTextConversion", pattern = """^([^\.]+)\.txt$""") + } + + testClass<AbstractLiteralTextToKotlinCopyPasteTest> { + model("copyPaste/plainTextLiteral", pattern = """^([^\.]+)\.txt$""") + } + + testClass<AbstractLiteralKotlinToKotlinCopyPasteTest> { + model("copyPaste/literal", pattern = """^([^\.]+)\.kt$""") + } + + testClass<AbstractInsertImportOnPasteTest> { + model("copyPaste/imports", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doTestCopy", testClassName = "Copy", recursive = false) + model("copyPaste/imports", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doTestCut", testClassName = "Cut", recursive = false) + } + + testClass<AbstractMoveOnCutPasteTest> { + model("copyPaste/moveDeclarations", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doTest") + } + + testClass<AbstractUpdateKotlinCopyrightTest> { + model("copyright", pattern = KT_OR_KTS, testMethod = "doTest") + } + + testClass<AbstractHighlightExitPointsTest> { + model("exitPoints") + } + + testClass<AbstractLineMarkersTest> { + model("codeInsight/lineMarker") + } + + testClass<AbstractLineMarkersTestInLibrarySources> { + model("codeInsightInLibrary/lineMarker", testMethod = "doTestWithLibrary") + } + + testClass<AbstractMultiModuleLineMarkerTest> { + model("multiModuleLineMarker", extension = null, recursive = false) + } + + testClass<AbstractShortenRefsTest> { + model("shortenRefs", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + testClass<AbstractAddImportTest> { + model("addImport", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractSmartSelectionTest> { + model("smartSelection", testMethod = "doTestSmartSelection", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractKotlinFileStructureTest> { + model("structureView/fileStructure", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractExpressionSelectionTest> { + model("expressionSelection", testMethod = "doTestExpressionSelection", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractCommonDecompiledTextTest> { + model("decompiler/decompiledText", pattern = """^([^\.]+)$""") + } + + testClass<AbstractJvmDecompiledTextTest> { + model("decompiler/decompiledTextJvm", pattern = """^([^\.]+)$""") + } + + testClass<AbstractCommonDecompiledTextFromJsMetadataTest> { + model("decompiler/decompiledText", pattern = """^([^\.]+)$""", targetBackend = TargetBackend.JS) + } + + testClass<AbstractJsDecompiledTextFromJsMetadataTest> { + model("decompiler/decompiledTextJs", pattern = """^([^\.]+)$""", targetBackend = TargetBackend.JS) + } + + testClass<AbstractClsStubBuilderTest> { + model("decompiler/stubBuilder", extension = null, recursive = false) + } + + testClass<AbstractJvmOptimizeImportsTest> { + model("editor/optimizeImports/jvm", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) + model("editor/optimizeImports/common", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + testClass<AbstractJsOptimizeImportsTest> { + model("editor/optimizeImports/js", pattern = KT_WITHOUT_DOTS_IN_NAME) + model("editor/optimizeImports/common", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractKotlinExceptionFilterTest> { + model("debugger/exceptionFilter", pattern = """^([^\.]+)$""", recursive = false) + } + + testClass<AbstractStubBuilderTest> { + model("stubs", extension = "kt") + } + + testClass<AbstractMultiFileHighlightingTest> { + model("multiFileHighlighting", recursive = false) + } + + testClass<AbstractMultiPlatformHighlightingTest> { + model("multiModuleHighlighting/multiplatform/", recursive = false, extension = null) + } + + testClass<AbstractHierarchicalExpectActualTest> { + model("multiModuleHighlighting/hierarchicalExpectActualMatching/", recursive = false, extension = null) + } + + testClass<AbstractQuickFixMultiModuleTest> { + model("multiModuleQuickFix", extension = null, deep = 1) + } + + testClass<AbstractKotlinGotoImplementationMultiModuleTest> { + model("navigation/implementations/multiModule", recursive = false, extension = null) + } + + testClass<AbstractKotlinGotoRelatedSymbolMultiModuleTest> { + model("navigation/relatedSymbols/multiModule", recursive = false, extension = null) + } + + testClass<AbstractKotlinGotoSuperMultiModuleTest> { + model("navigation/gotoSuper/multiModule", recursive = false, extension = null) + } + + testClass<AbstractExtractionTest> { + model("refactoring/introduceVariable", pattern = KT_OR_KTS, testMethod = "doIntroduceVariableTest") + model("refactoring/extractFunction", pattern = KT_OR_KTS, testMethod = "doExtractFunctionTest") + model("refactoring/introduceProperty", pattern = KT_OR_KTS, testMethod = "doIntroducePropertyTest") + model("refactoring/introduceParameter", pattern = KT_OR_KTS, testMethod = "doIntroduceSimpleParameterTest") + model("refactoring/introduceLambdaParameter", pattern = KT_OR_KTS, testMethod = "doIntroduceLambdaParameterTest") + model("refactoring/introduceJavaParameter", extension = "java", testMethod = "doIntroduceJavaParameterTest") + model("refactoring/introduceTypeParameter", pattern = KT_OR_KTS, testMethod = "doIntroduceTypeParameterTest") + model("refactoring/introduceTypeAlias", pattern = KT_OR_KTS, testMethod = "doIntroduceTypeAliasTest") + model("refactoring/extractSuperclass", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME, testMethod = "doExtractSuperclassTest") + model("refactoring/extractInterface", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME, testMethod = "doExtractInterfaceTest") + } + + testClass<AbstractPullUpTest> { + model("refactoring/pullUp/k2k", extension = "kt", singleClass = true, testClassName = "K2K", testMethod = "doKotlinTest") + model("refactoring/pullUp/k2j", extension = "kt", singleClass = true, testClassName = "K2J", testMethod = "doKotlinTest") + model("refactoring/pullUp/j2k", extension = "java", singleClass = true, testClassName = "J2K", testMethod = "doJavaTest") + } + + testClass<AbstractPushDownTest> { + model("refactoring/pushDown/k2k", extension = "kt", singleClass = true, testClassName = "K2K", testMethod = "doKotlinTest") + model("refactoring/pushDown/k2j", extension = "kt", singleClass = true, testClassName = "K2J", testMethod = "doKotlinTest") + model("refactoring/pushDown/j2k", extension = "java", singleClass = true, testClassName = "J2K", testMethod = "doJavaTest") + } + + testClass<AbstractKotlinCoverageOutputFilesTest> { + model("coverage/outputFiles") + } + + testClass<AbstractBytecodeToolWindowTest> { + model("internal/toolWindow", recursive = false, extension = null) + } + + testClass<AbstractReferenceResolveTest>("org.jetbrains.kotlin.idea.kdoc.KdocResolveTestGenerated") { + model("kdoc/resolve") + } + + testClass<AbstractKDocHighlightingTest> { + model("kdoc/highlighting") + } + + testClass<AbstractKDocTypingTest> { + model("kdoc/typing") + } + + testClass<AbstractGenerateTestSupportMethodActionTest> { + model("codeInsight/generate/testFrameworkSupport") + } + + testClass<AbstractGenerateHashCodeAndEqualsActionTest> { + model("codeInsight/generate/equalsWithHashCode") + } + + testClass<AbstractCodeInsightActionTest> { + model("codeInsight/generate/secondaryConstructors") + } + + testClass<AbstractGenerateToStringActionTest> { + model("codeInsight/generate/toString") + } + + testClass<AbstractIdeReplCompletionTest> { + model("repl/completion") + } + + testClass<AbstractPostfixTemplateProviderTest> { + model("codeInsight/postfix") + } + + testClass<AbstractScriptConfigurationHighlightingTest> { + model("script/definition/highlighting", extension = null, recursive = false) + model("script/definition/complex", extension = null, recursive = false, testMethod = "doComplexTest") + } + + testClass<AbstractScriptConfigurationNavigationTest> { + model("script/definition/navigation", extension = null, recursive = false) + } + + testClass<AbstractScriptConfigurationCompletionTest> { + model("script/definition/completion", extension = null, recursive = false) + } + + testClass<AbstractScriptDefinitionsOrderTest> { + model("script/definition/order", extension = null, recursive = false) + } + + testClass<AbstractNameSuggestionProviderTest> { + model("refactoring/nameSuggestionProvider") + } + + testClass<AbstractSlicerTreeTest> { + model("slicer", excludeDirs = listOf("mpp")) + } + + testClass<AbstractSlicerLeafGroupingTest> { + model("slicer/inflow", singleClass = true) + } + + testClass<AbstractSlicerNullnessGroupingTest> { + model("slicer/inflow", singleClass = true) + } + + testClass<AbstractSlicerMultiplatformTest> { + model("slicer/mpp", recursive = false, extension = null) + } + } + + testGroup("idea/scripting-support/test", "idea/scripting-support/testData") { + testClass<AbstractScratchRunActionTest> { + model("scratch", extension = "kts", testMethod = "doScratchCompilingTest", testClassName = "ScratchCompiling", recursive = false) + model("scratch", extension = "kts", testMethod = "doScratchReplTest", testClassName = "ScratchRepl", recursive = false) + model("scratch/multiFile", extension = null, testMethod = "doScratchMultiFileTest", testClassName = "ScratchMultiFile", recursive = false) + + model("worksheet", extension = "ws.kts", testMethod = "doWorksheetCompilingTest", testClassName = "WorksheetCompiling", recursive = false) + model("worksheet", extension = "ws.kts", testMethod = "doWorksheetReplTest", testClassName = "WorksheetRepl", recursive = false) + model("worksheet/multiFile", extension = null, testMethod = "doWorksheetMultiFileTest", testClassName = "WorksheetMultiFile", recursive = false) + + model("scratch/rightPanelOutput", extension = "kts", testMethod = "doRightPreviewPanelOutputTest", testClassName = "ScratchRightPanelOutput", recursive = false) + } + + testClass<AbstractScratchLineMarkersTest> { + model("scratch/lineMarker", testMethod = "doScratchTest", pattern = KT_OR_KTS) + } + } + + /* + // Maven and Gradle are not relevant for AS branch + + testGroup("idea/idea-maven/test", "idea/idea-maven/testData") { + testClass<AbstractMavenConfigureProjectByChangingFileTest> { + model("configurator/jvm", extension = null, recursive = false, testMethod = "doTestWithMaven") + model("configurator/js", extension = null, recursive = false, testMethod = "doTestWithJSMaven") + } + + testClass<AbstractKotlinMavenInspectionTest> { + model("maven-inspections", pattern = "^([\\w\\-]+).xml$", singleClass = true) + } + } + + testGroup("idea/idea-gradle/tests", "idea/testData") { + testClass<AbstractGradleConfigureProjectByChangingFileTest> { + model("configuration/gradle", extension = null, recursive = false, testMethod = "doTestGradle") + model("configuration/gsk", extension = null, recursive = false, testMethod = "doTestGradle") + } + } + + */ + + testGroup("idea/tests", "compiler/testData") { + testClass<AbstractResolveByStubTest> { + model("loadJava/compiledKotlin") + } + + testClass<AbstractLoadJavaClsStubTest> { + model("loadJava/compiledKotlin", testMethod = "doTestCompiledKotlin") + } + + testClass<AbstractIdeLightClassTest> { + model("asJava/lightClasses", excludeDirs = listOf("delegation", "script"), pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractIdeLightClassForScriptTest> { + model("asJava/script/ide", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractIdeCompiledLightClassTest> { + model("asJava/lightClasses", excludeDirs = listOf("local", "compilationErrors", "ideRegression"), pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) + } + } + + testGroup("idea/idea-completion/tests", "idea/idea-completion/testData") { + testClass<AbstractCompiledKotlinInJavaCompletionTest> { + model("injava", extension = "java", recursive = false) + } + + testClass<AbstractKotlinSourceInJavaCompletionTest> { + model("injava", extension = "java", recursive = false) + } + + testClass<AbstractKotlinStdLibInJavaCompletionTest> { + model("injava/stdlib", extension = "java", recursive = false) + } + + testClass<AbstractBasicCompletionWeigherTest> { + model("weighers/basic", pattern = KT_OR_KTS_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractSmartCompletionWeigherTest> { + model("weighers/smart", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractJSBasicCompletionTest> { + model("basic/common") + model("basic/js") + } + + testClass<AbstractJvmBasicCompletionTest> { + model("basic/common") + model("basic/java") + } + + testClass<AbstractJvmSmartCompletionTest> { + model("smart") + } + + testClass<AbstractKeywordCompletionTest> { + model("keywords", recursive = false) + } + + testClass<AbstractJvmWithLibBasicCompletionTest> { + model("basic/withLib", recursive = false) + } + + testClass<AbstractBasicCompletionHandlerTest> { + model("handlers/basic", pattern = KT_WITHOUT_DOTS_IN_NAME) + } + + testClass<AbstractSmartCompletionHandlerTest> { + model("handlers/smart") + } + + testClass<AbstractKeywordCompletionHandlerTest> { + model("handlers/keywords") + } + + testClass<AbstractCompletionCharFilterTest> { + model("handlers/charFilter") + } + + testClass<AbstractMultiFileJvmBasicCompletionTest> { + model("basic/multifile", extension = null, recursive = false) + } + + testClass<AbstractMultiFileSmartCompletionTest> { + model("smartMultiFile", extension = null, recursive = false) + } + + testClass<AbstractJvmBasicCompletionTest>("KDocCompletionTestGenerated") { + model("kdoc") + } + + testClass<AbstractJava8BasicCompletionTest> { + model("basic/java8") + } + + testClass<AbstractCompletionIncrementalResolveTest> { + model("incrementalResolve") + } + + testClass<AbstractMultiPlatformCompletionTest> { + model("multiPlatform", recursive = false, extension = null) + } + } + + //TODO: move these tests into idea-completion module + testGroup("idea/tests", "idea/idea-completion/testData") { + testClass<AbstractCodeFragmentCompletionHandlerTest> { + model("handlers/runtimeCast") + } + + testClass<AbstractCodeFragmentCompletionTest> { + model("basic/codeFragments", extension = "kt") + } + } + + testGroup("j2k/tests", "j2k/testData") { + testClass<AbstractJavaToKotlinConverterSingleFileTest> { + model("fileOrElement", extension = "java") + } + } + testGroup("j2k/tests", "j2k/testData") { + testClass<AbstractJavaToKotlinConverterMultiFileTest> { + model("multiFile", extension = null, recursive = false) + } + } + testGroup("j2k/tests", "j2k/testData") { + testClass<AbstractJavaToKotlinConverterForWebDemoTest> { + model("fileOrElement", extension = "java") + } + } + + testGroup("nj2k/tests", "nj2k/testData") { + testClass<AbstractNewJavaToKotlinConverterSingleFileTest> { + model("newJ2k", pattern = """^([^\.]+)\.java$""") + } + testClass<AbstractCommonConstraintCollectorTest> { + model("inference/common") + } + testClass<AbstractNullabilityInferenceTest> { + model("inference/nullability") + } + testClass<AbstractMutabilityInferenceTest> { + model("inference/mutability") + } + testClass<AbstractNewJavaToKotlinCopyPasteConversionTest> { + model("copyPaste", pattern = """^([^\.]+)\.java$""") + } + testClass<AbstractTextNewJavaToKotlinCopyPasteConversionTest> { + model("copyPastePlainText", pattern = """^([^\.]+)\.txt$""") + } + testClass<AbstractNewJavaToKotlinConverterMultiFileTest> { + model("multiFile", extension = null, recursive = false) + } + } + +/* There is no jps in AS + .... +*/ + testGroup("compiler/incremental-compilation-impl/test", "jps-plugin/testData") { + testClass<AbstractIncrementalJvmCompilerRunnerTest> { + model("incremental/pureKotlin", extension = null, recursive = false) + model("incremental/classHierarchyAffected", extension = null, recursive = false) + model("incremental/inlineFunCallSite", extension = null, excludeParentDirs = true) + model("incremental/withJava", extension = null, excludeParentDirs = true) + model("incremental/incrementalJvmCompilerOnly", extension = null, excludeParentDirs = true) + } + + testClass<AbstractIncrementalJsCompilerRunnerTest> { + model("incremental/pureKotlin", extension = null, recursive = false) + model("incremental/classHierarchyAffected", extension = null, recursive = false) + model("incremental/js", extension = null, excludeParentDirs = true) + } + + testClass<AbstractIncrementalJsCompilerRunnerWithFriendModulesDisabledTest> { + model("incremental/js/friendsModuleDisabled", extension = null, recursive = false) + } + + testClass<AbstractIncrementalMultiplatformJvmCompilerRunnerTest> { + model("incremental/multiplatform/singleModule", extension = null, excludeParentDirs = true) + } + testClass<AbstractIncrementalMultiplatformJsCompilerRunnerTest> { + model("incremental/multiplatform/singleModule", extension = null, excludeParentDirs = true) + } + } + + testGroup("plugins/android-extensions/android-extensions-compiler/test", "plugins/android-extensions/android-extensions-compiler/testData") { + testClass<AbstractAndroidSyntheticPropertyDescriptorTest> { + model("descriptors", recursive = false, extension = null) + } + + testClass<AbstractAndroidBoxTest> { + model("codegen/android", recursive = false, extension = null, testMethod = "doCompileAgainstAndroidSdkTest") + model("codegen/android", recursive = false, extension = null, testMethod = "doFakeInvocationTest", testClassName = "Invoke") + } + + testClass<AbstractAndroidBytecodeShapeTest> { + model("codegen/bytecodeShape", recursive = false, extension = null) + } + + testClass<AbstractParcelBytecodeListingTest> { + model("parcel/codegen") + } + } + + testGroup("plugins/kapt3/kapt3-compiler/test", "plugins/kapt3/kapt3-compiler/testData") { + testClass<AbstractClassFileToSourceStubConverterTest> { + model("converter") + } + + testClass<AbstractKotlinKaptContextTest> { + model("kotlinRunner") + } + } + + testGroup("plugins/kapt3/kapt3-cli/test", "plugins/kapt3/kapt3-cli/testData") { + testClass<AbstractArgumentParsingTest> { + model("argumentParsing", extension = "txt") + } + + testClass<AbstractKaptToolIntegrationTest> { + model("integration", recursive = false, extension = null) + } + } + + testGroup("plugins/allopen/allopen-cli/test", "plugins/allopen/allopen-cli/testData") { + testClass<AbstractBytecodeListingTestForAllOpen> { + model("bytecodeListing", extension = "kt") + } + } + + testGroup("plugins/noarg/noarg-cli/test", "plugins/noarg/noarg-cli/testData") { + testClass<AbstractBytecodeListingTestForNoArg> { + model("bytecodeListing", extension = "kt") + } + + testClass<AbstractBlackBoxCodegenTestForNoArg> { + model("box", targetBackend = TargetBackend.JVM) + } + } + + testGroup("plugins/sam-with-receiver/sam-with-receiver-cli/test", "plugins/sam-with-receiver/sam-with-receiver-cli/testData") { + testClass<AbstractSamWithReceiverTest> { + model("diagnostics") + } + testClass<AbstractSamWithReceiverScriptTest> { + model("script", extension = "kts") + } + } + + testGroup( + "plugins/kotlin-serialization/kotlin-serialization-compiler/test", + "plugins/kotlin-serialization/kotlin-serialization-compiler/testData" + ) { + testClass<AbstractSerializationPluginDiagnosticTest> { + model("diagnostics") + } + + testClass<AbstractSerializationPluginBytecodeListingTest> { + model("codegen") + } + + testClass<AbstractSerializationIrBytecodeListingTest> { + model("codegen") + } + } +/* + testGroup("plugins/android-extensions/android-extensions-idea/tests", "plugins/android-extensions/android-extensions-idea/testData") { + testClass<AbstractAndroidCompletionTest> { + model("android/completion", recursive = false, extension = null) + } + + testClass<AbstractAndroidGotoTest> { + model("android/goto", recursive = false, extension = null) + } + + testClass<AbstractAndroidRenameTest> { + model("android/rename", recursive = false, extension = null) + } + + testClass<AbstractAndroidLayoutRenameTest> { + model("android/renameLayout", recursive = false, extension = null) + } + + testClass<AbstractAndroidFindUsagesTest> { + model("android/findUsages", recursive = false, extension = null) + } + + testClass<AbstractAndroidUsageHighlightingTest> { + model("android/usageHighlighting", recursive = false, extension = null) + } + + testClass<AbstractAndroidExtractionTest> { + model("android/extraction", recursive = false, extension = null) + } + + testClass<AbstractParcelCheckerTest> { + model("android/parcel/checker", excludeParentDirs = true) + } + + testClass<AbstractParcelQuickFixTest> { + model("android/parcel/quickfix", pattern = """^(\w+)\.((before\.Main\.\w+)|(test))$""", testMethod = "doTestWithExtraFile") + } + } + + testGroup("idea/idea-android/tests", "idea/testData") { + testClass<AbstractConfigureProjectTest> { + model("configuration/android-gradle", pattern = """(\w+)_before\.gradle$""", testMethod = "doTestAndroidGradle") + model("configuration/android-gsk", pattern = """(\w+)_before\.gradle.kts$""", testMethod = "doTestAndroidGradle") + } + + testClass<AbstractAndroidIntentionTest> { + model("android/intention", pattern = "^([\\w\\-_]+)\\.kt$") + } + + testClass<AbstractAndroidResourceIntentionTest> { + model("android/resourceIntention", extension = "test", singleClass = true) + } + + testClass<AbstractAndroidQuickFixMultiFileTest> { + model("android/quickfix", pattern = """^(\w+)\.((before\.Main\.\w+)|(test))$""", testMethod = "doTestWithExtraFile") + } + + testClass<AbstractKotlinLintTest> { + model("android/lint", excludeParentDirs = true) + } + + testClass<AbstractAndroidLintQuickfixTest> { + model("android/lintQuickfix", pattern = "^([\\w\\-_]+)\\.kt$") + } + + testClass<AbstractAndroidResourceFoldingTest> { + model("android/folding") + } + + testClass<AbstractAndroidGutterIconTest> { + model("android/gutterIcon") + } + } +*/ +} diff --git a/idea/idea-core/src/org/jetbrains/kotlin/idea/statistics/KotlinFUSLogger.kt.as42 b/idea/idea-core/src/org/jetbrains/kotlin/idea/statistics/KotlinFUSLogger.kt.as42 new file mode 100644 index 00000000000..0e1adf9ff46 --- /dev/null +++ b/idea/idea-core/src/org/jetbrains/kotlin/idea/statistics/KotlinFUSLogger.kt.as42 @@ -0,0 +1,18 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.statistics + +open class KotlinFUSLogger { + companion object { + fun log(group: FUSEventGroups, event: String) { + // Not whitelisted for AS + } + + fun log(group: FUSEventGroups, event: String, eventData: Map<String, String>) { + // Not whitelisted for AS + } + } +}
\ No newline at end of file diff --git a/idea/idea-core/src/org/jetbrains/kotlin/idea/statistics/ProjectConfigurationCollector.kt.as42 b/idea/idea-core/src/org/jetbrains/kotlin/idea/statistics/ProjectConfigurationCollector.kt.as42 new file mode 100644 index 00000000000..3fe75589e1c --- /dev/null +++ b/idea/idea-core/src/org/jetbrains/kotlin/idea/statistics/ProjectConfigurationCollector.kt.as42 @@ -0,0 +1,3 @@ +class ProjectConfigurationCollector { + // Not whitelisted +}
\ No newline at end of file diff --git a/idea/idea-git/src/org/jetbrains/kotlin/git/KotlinExplicitMovementProvider.kt.as42 b/idea/idea-git/src/org/jetbrains/kotlin/git/KotlinExplicitMovementProvider.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/idea/idea-git/src/org/jetbrains/kotlin/git/KotlinExplicitMovementProvider.kt.as42 diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/HierarchicalMultiplatformProjectImportingTest.kt.as42 b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/HierarchicalMultiplatformProjectImportingTest.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/HierarchicalMultiplatformProjectImportingTest.kt.as42 diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/MultiplatformProjectImportingTest.kt.as42 b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/MultiplatformProjectImportingTest.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/MultiplatformProjectImportingTest.kt.as42 diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/MultiplatformTestCompatibilityMatrix.kt.as42 b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/MultiplatformTestCompatibilityMatrix.kt.as42 new file mode 100644 index 00000000000..6bbb8c73dc3 --- /dev/null +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/MultiplatformTestCompatibilityMatrix.kt.as42 @@ -0,0 +1,8 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.gradle + +fun KaptImportingTest.isAndroidStudio() = true diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt.as42 b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/NewMultiplatformProjectImportingTest.kt.as42 diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/PackagePrefixImportingTest.kt.as42 b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/PackagePrefixImportingTest.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/gradle/PackagePrefixImportingTest.kt.as42 diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleConfiguratorPlatformSpecificTest.kt.as42 b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleConfiguratorPlatformSpecificTest.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleConfiguratorPlatformSpecificTest.kt.as42 diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleFacetImportTest.kt.as42 b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleFacetImportTest.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleFacetImportTest.kt.as42 diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleInspectionTestCompatibilityMatrix.kt.as42 b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleInspectionTestCompatibilityMatrix.kt.as42 new file mode 100644 index 00000000000..bd96057db50 --- /dev/null +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/codeInsight/gradle/GradleInspectionTestCompatibilityMatrix.kt.as42 @@ -0,0 +1,8 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.codeInsight.gradle + +fun isGradleInspectionTestApplicable() = false
\ No newline at end of file diff --git a/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/service/MavenProjectImporter.kt.as42 b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/service/MavenProjectImporter.kt.as42 new file mode 100644 index 00000000000..47feb237c39 --- /dev/null +++ b/idea/idea-new-project-wizard/src/org/jetbrains/kotlin/tools/projectWizard/wizard/service/MavenProjectImporter.kt.as42 @@ -0,0 +1,15 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.tools.projectWizard.wizard.service + +import com.intellij.openapi.project.Project +import java.nio.file.Path + +class MavenProjectImporter(private val project: Project) { + fun importProject(path: Path) { + // AS does not support Maven + } +}
\ No newline at end of file diff --git a/idea/resources/META-INF/android-lint.xml.as42 b/idea/resources/META-INF/android-lint.xml.as42 new file mode 100644 index 00000000000..5a029687008 --- /dev/null +++ b/idea/resources/META-INF/android-lint.xml.as42 @@ -0,0 +1,5 @@ +<idea-plugin> + <extensions defaultExtensionNs="com.intellij"> + <externalAnnotator language="kotlin" implementationClass="org.jetbrains.android.inspections.lint.AndroidLintExternalAnnotator"/> + </extensions> +</idea-plugin>
\ No newline at end of file diff --git a/idea/resources/META-INF/git4idea.xml.as42 b/idea/resources/META-INF/git4idea.xml.as42 new file mode 100644 index 00000000000..1bb24d148a3 --- /dev/null +++ b/idea/resources/META-INF/git4idea.xml.as42 @@ -0,0 +1,4 @@ +<idea-plugin> + <extensions defaultExtensionNs="Git4Idea"> + </extensions> +</idea-plugin>
\ No newline at end of file diff --git a/idea/resources/META-INF/plugin.xml.as42 b/idea/resources/META-INF/plugin.xml.as42 new file mode 100644 index 00000000000..f80be3dd9f3 --- /dev/null +++ b/idea/resources/META-INF/plugin.xml.as42 @@ -0,0 +1,157 @@ +<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude" version="2" url="http://kotlinlang.org" allow-bundled-update="true"> + <id>org.jetbrains.kotlin</id> + + <name>Kotlin</name> + <description><![CDATA[ +The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio. +<br> +<a href="http://kotlinlang.org/docs/tutorials/getting-started.html">Getting Started in IntelliJ IDEA</a><br> +<a href="http://kotlinlang.org/docs/tutorials/kotlin-android.html">Getting Started in Android Studio</a><br> +<a href="http://slack.kotlinlang.org/">Public Slack</a><br> +<a href="https://youtrack.jetbrains.com/issues/KT">Issue tracker</a><br> +]]></description> + <version>@snapshot@</version> + <vendor url="http://www.jetbrains.com">JetBrains</vendor> + + <idea-version since-build="202.6397.94" until-build="202.*"/> + + <change-notes><![CDATA[ + <h3>1.4.0</h3> + Released: <b>August 17, 2020</b> + <ul> + <li>New compiler with better type inference.</li> + <li>IR backends for JVM and JS in Alpha mode (<a href="https://kotlinlang.org/docs/reference/whatsnew14.html#unified-backends-and-extensibility">requires opt-in</a>).</li> + <li>A new flexible Kotlin Project Wizard for easy creation and configuration of different types of projects.</li> + <li>New IDE functionality to debug coroutines.</li> + <li>IDE performance improvements: many actions, such as project opening and autocomplete suggestions now complete up to 4 times faster.</li> + <li>New language features such as SAM conversions, trailing comma, and other.</li> + <li>Type annotations in the JVM bytecode and new modes for generating default interfaces in Kotlin/JVM.</li> + <li>New Gradle DSL for Kotlin/JS.</li> + <li>Improved performance and interop with Swift and Objective-C in Kotlin/Native.</li> + <li>Support for sharing code in several targets thanks to the hierarchical structure in multiplatform projects.</li> + <li>New collection operators, delegated properties improvements, the double-ended queue implementation ArrayDeque, and much more new things in the standard library.</li> + </ul> + For more details, see <a href="https://kotlinlang.org/docs/reference/whatsnew14.html?utm_source=product&utm_medium=link">What’s New in Kotlin 1.4.0</a> and <a href="http://blog.jetbrains.com/kotlin/2020/08/kotlin-1-4-released-with-a-focus-on-quality-and-performance/?utm_source=product&utm_medium=link">this blog post</a>. + <br><br> + To get the most out of the changes and improvements introduced in Kotlin 1.4, join our <a href="https://kotlinlang.org/lp/event-14/">Online Event</a> where you will be able to enjoy four days of Kotlin talks, Q&As with the Kotlin team, and more. + ]]> + </change-notes> + + <depends>com.intellij.modules.platform</depends> + <depends>com.intellij.modules.androidstudio</depends> + + <depends optional="true" config-file="junit.xml">JUnit</depends> + <depends optional="true" config-file="gradle.xml">com.intellij.gradle</depends> + <depends optional="true" config-file="gradle-java.xml">org.jetbrains.plugins.gradle</depends> + <depends optional="true" config-file="kotlin-gradle-testing.xml">org.jetbrains.plugins.gradle</depends> + <depends optional="true" config-file="gradle-groovy.xml">org.intellij.groovy</depends> + <depends optional="true" config-file="maven-common.xml">org.jetbrains.idea.maven</depends> + <depends optional="true" config-file="maven.xml">org.jetbrains.idea.maven</depends> + <depends optional="true" config-file="testng-j.xml">TestNG-J</depends> + <depends optional="true" config-file="coverage.xml">Coverage</depends> + <depends optional="true" config-file="i18n.xml">com.intellij.java-i18n</depends> + <depends optional="true" config-file="decompiler.xml">org.jetbrains.java.decompiler</depends> + <depends optional="true" config-file="git4idea.xml">Git4Idea</depends> + <depends optional="true" config-file="stream-debugger.xml">org.jetbrains.debugger.streams</depends> + + <!-- ULTIMATE-PLUGIN-PLACEHOLDER --> + + <!-- CIDR-PLUGIN-PLACEHOLDER-START --> + <depends>com.intellij.modules.java</depends> + <depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends> + <depends optional="true" config-file="kotlin-copyright.xml">com.intellij.copyright</depends> + <depends optional="true" config-file="injection.xml">org.intellij.intelliLang</depends> + <!-- CIDR-PLUGIN-PLACEHOLDER-END --> + + <xi:include href="plugin-common.xml" xpointer="xpointer(/idea-plugin/*)"/> + + <!-- CIDR-PLUGIN-EXCLUDE-START --> + <xi:include href="jvm-common.xml" xpointer="xpointer(/idea-plugin/*)"/> + <xi:include href="jvm.xml" xpointer="xpointer(/idea-plugin/*)"/> + <!-- CIDR-PLUGIN-EXCLUDE-END --> + + <xi:include href="native-common.xml" xpointer="xpointer(/idea-plugin/*)"/> + <xi:include href="native.xml" xpointer="xpointer(/idea-plugin/*)"/> + + <xi:include href="tipsAndTricks.xml" xpointer="xpointer(/idea-plugin/*)"/> + + <xi:include href="extensions/ide.xml" xpointer="xpointer(/idea-plugin/*)"/> + + <xi:include href="kotlinx-serialization.xml" xpointer="xpointer(/idea-plugin/*)"/> + + <xi:include href="scripting-support.xml" xpointer="xpointer(/idea-plugin/*)"/> + + <extensionPoints> + <xi:include href="extensions/compiler.xml" xpointer="xpointer(/idea-plugin/extensionPoints/*)"/> + + <extensionPoint qualifiedName="org.jetbrains.kotlin.pluginUpdateVerifier" + interface="org.jetbrains.kotlin.idea.update.PluginUpdateVerifier"/> + </extensionPoints> + + <xi:include href="plugin-kotlin-extensions.xml" xpointer="xpointer(/idea-plugin/*)"/> + + <extensions defaultExtensionNs="com.intellij.jvm"> + <declarationSearcher language="kotlin" implementationClass="org.jetbrains.kotlin.idea.jvm.KotlinDeclarationSearcher"/> + </extensions> + + <extensions defaultExtensionNs="com.intellij"> + <applicationInitializedListener implementation="org.jetbrains.kotlin.idea.PluginStartupListener" /> + <applicationService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupService" /> + + <postStartupActivity implementation="org.jetbrains.kotlin.idea.PluginStartupActivity"/> + <postStartupActivity implementation="org.jetbrains.kotlin.idea.versions.KotlinUpdatePluginStartupActivity" /> + + <postStartupActivity implementation="org.jetbrains.kotlin.idea.completion.LookupCancelWatcher"/> + <postStartupActivity implementation="org.jetbrains.kotlin.idea.caches.KotlinPackageContentModificationListener"/> + <postStartupActivity implementation="org.jetbrains.kotlin.idea.configuration.KotlinMigrationProjectComponent"/> + + <projectService serviceImplementation="org.jetbrains.kotlin.idea.completion.LookupCancelService"/> + <projectService serviceImplementation="org.jetbrains.kotlin.idea.configuration.KotlinMigrationProjectService"/> + + <highlightingPassFactory implementation="org.jetbrains.kotlin.idea.highlighter.KotlinBeforeResolveHighlightingPass$Registrar"/> + <highlightingPassFactory implementation="org.jetbrains.kotlin.idea.highlighter.ScriptExternalHighlightingPass$Registrar"/> + <highlightingPassFactory implementation="org.jetbrains.kotlin.idea.parameterInfo.custom.KotlinCodeHintsPass$Registrar"/> + <highlightingPassFactory implementation="org.jetbrains.kotlin.idea.refactoring.cutPaste.MoveDeclarationsPassFactory$Registrar"/> + + <projectService serviceImplementation="org.jetbrains.kotlin.idea.caches.trackers.KotlinCodeBlockModificationListener"/> + + <fileTypeUsageSchemaDescriptor schema="Gradle Script" implementationClass="org.jetbrains.kotlin.idea.core.script.KotlinGradleScriptFileTypeSchemaDetector"/> + + <completion.ml.model implementation="org.jetbrains.kotlin.idea.completion.ml.KotlinMLRankingProvider"/> + <suggestedRefactoringSupport language="kotlin" implementationClass="org.jetbrains.kotlin.idea.refactoring.suggested.KotlinSuggestedRefactoringSupport"/> + + <refactoring.moveInnerHandler language="kotlin" + implementationClass="org.jetbrains.kotlin.idea.refactoring.move.MoveKotlinInnerHandler"/> + + <defaultLiveTemplates file="liveTemplates/Kotlin.xml"/> + + <fileType name="Kotlin" + implementationClass="org.jetbrains.kotlin.idea.KotlinFileType" + fieldName="INSTANCE" + language="kotlin" + extensions="kt;kts"/> + <fileType name="ARCHIVE" extensions="klib"/> + <fileType name="KNM" + implementationClass="org.jetbrains.kotlin.idea.klib.KlibMetaFileType" + fieldName="INSTANCE" + extensions="knm"/> + <fileType name="KJSM" + implementationClass="org.jetbrains.kotlin.idea.decompiler.js.KotlinJavaScriptMetaFileType" + fieldName="INSTANCE" + extensions="kjsm"/> + + <fileType name="kotlin_builtins" + implementationClass="org.jetbrains.kotlin.idea.decompiler.builtIns.KotlinBuiltInFileType" + fieldName="INSTANCE" + extensions="kotlin_builtins;kotlin_metadata"/> + + <fileType name="kotlin_module" + implementationClass="org.jetbrains.kotlin.idea.KotlinModuleFileType" + fieldName="INSTANCE" + extensions="kotlin_module"/> + </extensions> + + <extensions defaultExtensionNs="org.jetbrains.kotlin"> + <pluginUpdateVerifier implementation="org.jetbrains.kotlin.idea.update.GooglePluginUpdateVerifier"/> + </extensions> +</idea-plugin> diff --git a/idea/src/org/jetbrains/kotlin/idea/IDESettingsFUSCollector.kt.as42 b/idea/src/org/jetbrains/kotlin/idea/IDESettingsFUSCollector.kt.as42 new file mode 100644 index 00000000000..939c6c53fe5 --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/IDESettingsFUSCollector.kt.as42 @@ -0,0 +1,3 @@ +class IDESettingsFUSCollector { + // Not whitelisted +} diff --git a/idea/src/org/jetbrains/kotlin/idea/configuration/MLCompletionForKotlin.kt.as42 b/idea/src/org/jetbrains/kotlin/idea/configuration/MLCompletionForKotlin.kt.as42 new file mode 100644 index 00000000000..d1d25c9b8bd --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/configuration/MLCompletionForKotlin.kt.as42 @@ -0,0 +1,16 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.configuration + +internal object MLCompletionForKotlin { + const val isAvailable: Boolean = false + + var isEnabled: Boolean + get() = false + set(value) { + throw UnsupportedOperationException() + } +} diff --git a/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/dslStyleIcon.kt.as42 b/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/dslStyleIcon.kt.as42 new file mode 100644 index 00000000000..81a8246bf13 --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/highlighter/markers/dslStyleIcon.kt.as42 @@ -0,0 +1,14 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.highlighter.markers + +import com.intellij.icons.AllIcons +import javax.swing.Icon + +// FIX ME WHEN BUNCH as35 REMOVED +internal fun createDslStyleIcon(styleId: Int): Icon { + return AllIcons.Gutter.Colors +}
\ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/reporter/ITNReporterCompat.kt.as42 b/idea/src/org/jetbrains/kotlin/idea/reporter/ITNReporterCompat.kt.as42 new file mode 100644 index 00000000000..f6dcd38c87e --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/reporter/ITNReporterCompat.kt.as42 @@ -0,0 +1,33 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.reporter + +import com.intellij.diagnostic.ITNReporter +import com.intellij.openapi.diagnostic.IdeaLoggingEvent +import com.intellij.openapi.diagnostic.SubmittedReportInfo +import com.intellij.util.Consumer +import java.awt.Component + +abstract class ITNReporterCompat : ITNReporter() { + final override fun submit( + events: Array<IdeaLoggingEvent>, + additionalInfo: String?, + parentComponent: Component?, + consumer: Consumer<SubmittedReportInfo> + ): Boolean { + return submitCompat(events, additionalInfo, parentComponent, consumer) + } + + open fun submitCompat( + events: Array<IdeaLoggingEvent>, + additionalInfo: String?, + parentComponent: Component?, + consumer: Consumer<SubmittedReportInfo> + ): Boolean { + @Suppress("IncompatibleAPI") + return super.submit(events, additionalInfo, parentComponent, consumer) + } +} diff --git a/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as42 b/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as42 new file mode 100644 index 00000000000..2697b7a4e4a --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as42 @@ -0,0 +1,12 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +@file:Suppress("DEPRECATION") + +package org.jetbrains.kotlin.idea + +// Remove the function, when there's no dependency to cidr during running Kotlin tests. +fun registerAdditionalResourceBundleInTests() { +}
\ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/update/GooglePluginUpdateVerifier.kt.as42 b/idea/src/org/jetbrains/kotlin/idea/update/GooglePluginUpdateVerifier.kt.as42 new file mode 100644 index 00000000000..dc9c96c6175 --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/update/GooglePluginUpdateVerifier.kt.as42 @@ -0,0 +1,157 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.update + +import com.intellij.ide.plugins.IdeaPluginDescriptor +import com.intellij.ide.plugins.PluginManagerCore +import com.intellij.ide.plugins.PluginNode +import com.intellij.openapi.diagnostic.Logger +import org.jetbrains.kotlin.idea.KotlinBundle +import org.jetbrains.kotlin.idea.util.isDev +import org.jetbrains.kotlin.idea.util.isEap +import java.io.IOException +import java.net.URL +import java.util.* +import javax.xml.bind.JAXBContext +import javax.xml.bind.JAXBException +import javax.xml.bind.annotation.* + +class GooglePluginUpdateVerifier : PluginUpdateVerifier() { + override val verifierName: String + get() = KotlinBundle.message("update.name.android.studio") + + // Verifies if a plugin can be installed in Android Studio 3.2+. + // Currently used only by KotlinPluginUpdater. + override fun verify(pluginDescriptor: IdeaPluginDescriptor): PluginVerifyResult? { + if (pluginDescriptor.pluginId.idString != KOTLIN_PLUGIN_ID) { + return null + } + + val version = pluginDescriptor.version + if (isEap(version) || isDev(version)) { + return PluginVerifyResult.accept() + } + + try { + val url = URL(METADATA_FILE_URL) + val stream = url.openStream() + val context = JAXBContext.newInstance(PluginCompatibility::class.java) + val unmarshaller = context.createUnmarshaller() + val pluginCompatibility = unmarshaller.unmarshal(stream) as PluginCompatibility + + val release = getRelease(pluginCompatibility) + ?: return PluginVerifyResult.decline(KotlinBundle.message("update.reason.text.no.verified.versions.for.this.build")) + + return if (release.plugins().any { KOTLIN_PLUGIN_ID == it.id && version == it.version }) + PluginVerifyResult.accept() + else + PluginVerifyResult.decline(KotlinBundle.message("update.reason.text.version.to.be.verified")) + } catch (e: Exception) { + LOG.info("Exception when verifying plugin ${pluginDescriptor.pluginId.idString} version $version", e) + return when (e) { + is IOException -> + PluginVerifyResult.decline(KotlinBundle.message("update.reason.text.unable.to.connect.to.compatibility.verification.repository")) + is JAXBException -> PluginVerifyResult.decline(KotlinBundle.message("update.reason.text.unable.to.parse.compatibility.verification.metadata")) + else -> PluginVerifyResult.decline( + KotlinBundle.message("update.reason.text.exception.during.verification", + e.message.toString() + ) + ) + } + } + } + + private fun getRelease(pluginCompatibility: PluginCompatibility): StudioRelease? { + for (studioRelease in pluginCompatibility.releases()) { + if (buildInRange(studioRelease.name, studioRelease.sinceBuild, studioRelease.untilBuild)) { + return studioRelease + } + } + return null + } + + private fun buildInRange(name: String?, sinceBuild: String?, untilBuild: String?): Boolean { + val descriptor = PluginNode() + descriptor.name = name + descriptor.sinceBuild = sinceBuild + descriptor.untilBuild = untilBuild + return PluginManagerCore.isCompatible(descriptor) + } + + companion object { + private const val KOTLIN_PLUGIN_ID = "org.jetbrains.kotlin" + private const val METADATA_FILE_URL = "https://dl.google.com/android/studio/plugins/compatibility.xml" + + private val LOG = Logger.getInstance(GooglePluginUpdateVerifier::class.java) + + private fun PluginCompatibility.releases() = studioRelease ?: emptyArray() + private fun StudioRelease.plugins() = ideaPlugin ?: emptyArray() + + @XmlRootElement(name = "plugin-compatibility") + @XmlAccessorType(XmlAccessType.FIELD) + class PluginCompatibility { + @XmlElement(name = "studio-release") + var studioRelease: Array<StudioRelease>? = null + + override fun toString(): String { + return "PluginCompatibility(studioRelease=${Arrays.toString(studioRelease)})" + } + } + + @XmlAccessorType(XmlAccessType.FIELD) + class StudioRelease { + @XmlAttribute(name = "until-build") + var untilBuild: String? = null + @XmlAttribute(name = "since-build") + var sinceBuild: String? = null + @XmlAttribute + var name: String? = null + @XmlAttribute + var channel: String? = null + + @XmlElement(name = "idea-plugin") + var ideaPlugin: Array<IdeaPlugin>? = null + + override fun toString(): String { + return "StudioRelease(" + + "untilBuild=$untilBuild, name=$name, ideaPlugin=${Arrays.toString(ideaPlugin)}, " + + "sinceBuild=$sinceBuild, channel=$channel" + + ")" + } + } + + @XmlAccessorType(XmlAccessType.FIELD) + class IdeaPlugin { + @XmlAttribute + var id: String? = null + @XmlAttribute + var sha256: String? = null + @XmlAttribute + var channel: String? = null + @XmlAttribute + var version: String? = null + + @XmlElement(name = "idea-version") + var ideaVersion: IdeaVersion? = null + + override fun toString(): String { + return "IdeaPlugin(id=$id, sha256=$sha256, ideaVersion=$ideaVersion, channel=$channel, version=$version)" + } + } + + @XmlAccessorType(XmlAccessType.FIELD) + class IdeaVersion { + @XmlAttribute(name = "until-build") + var untilBuild: String? = null + @XmlAttribute(name = "since-build") + var sinceBuild: String? = null + + override fun toString(): String { + return "IdeaVersion(untilBuild=$untilBuild, sinceBuild=$sinceBuild)" + } + } + } +} diff --git a/idea/src/org/jetbrains/kotlin/idea/update/verify.kt.as42 b/idea/src/org/jetbrains/kotlin/idea/update/verify.kt.as42 new file mode 100644 index 00000000000..8ee62b0a17c --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/update/verify.kt.as42 @@ -0,0 +1,35 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.idea.update + +import com.intellij.ide.plugins.IdeaPluginDescriptor +import com.intellij.openapi.util.registry.Registry +import org.jetbrains.kotlin.idea.PluginUpdateStatus + +// Do an additional verification with PluginUpdateVerifier. Enabled only in AS 3.2+ +fun verify(updateStatus: PluginUpdateStatus.Update): PluginUpdateStatus { + @Suppress("InvalidBundleOrProperty") + val pluginVerifierEnabled = Registry.`is`("kotlin.plugin.update.verifier.enabled", true) + if (!pluginVerifierEnabled) { + return updateStatus + } + + val pluginDescriptor: IdeaPluginDescriptor = updateStatus.pluginDescriptor + val pluginVerifiers = PluginUpdateVerifier.EP_NAME.extensions + + for (pluginVerifier in pluginVerifiers) { + val verifyResult = pluginVerifier.verify(pluginDescriptor) ?: continue + if (!verifyResult.verified) { + return PluginUpdateStatus.Unverified( + pluginVerifier.verifierName, + verifyResult.declineMessage, + updateStatus + ) + } + } + + return updateStatus +}
\ No newline at end of file diff --git a/idea/testData/gradle/testRunConfigurations/kotlinJUnitSettings/src/test/kotlin/MyKotlinTest.kt.as42 b/idea/testData/gradle/testRunConfigurations/kotlinJUnitSettings/src/test/kotlin/MyKotlinTest.kt.as42 new file mode 100644 index 00000000000..916ff6fe794 --- /dev/null +++ b/idea/testData/gradle/testRunConfigurations/kotlinJUnitSettings/src/test/kotlin/MyKotlinTest.kt.as42 @@ -0,0 +1,7 @@ +import org.junit.Test + +class <lineMarker descr="Run Test" settings="Nothing here">MyKotlinTest</lineMarker> { + @Test + fun <lineMarker descr="Run Test" settings="Nothing here">testA</lineMarker>() { + } +}
\ No newline at end of file diff --git a/idea/testData/gradle/testRunConfigurations/preferredConfigurations/src/test/kotlin/MyKotlinTest.kt.as42 b/idea/testData/gradle/testRunConfigurations/preferredConfigurations/src/test/kotlin/MyKotlinTest.kt.as42 new file mode 100644 index 00000000000..e5ec5c75062 --- /dev/null +++ b/idea/testData/gradle/testRunConfigurations/preferredConfigurations/src/test/kotlin/MyKotlinTest.kt.as42 @@ -0,0 +1,11 @@ +import org.junit.Test + +class <lineMarker descr="Run Test" settings="Nothing here">MyKotlinTest</lineMarker> { + @Test + fun <lineMarker descr="Run Test" settings="Nothing here">testA</lineMarker>() { + } + + @Test + fun <lineMarker descr="Run Test" settings="Nothing here">testB</lineMarker>() { + } +}
\ No newline at end of file diff --git a/jps-plugin/src/org/jetbrains/kotlin/jps/build/ideaPlatform.kt.as42 b/jps-plugin/src/org/jetbrains/kotlin/jps/build/ideaPlatform.kt.as42 new file mode 100644 index 00000000000..6546b2059d2 --- /dev/null +++ b/jps-plugin/src/org/jetbrains/kotlin/jps/build/ideaPlatform.kt.as42 @@ -0,0 +1,13 @@ +/* + * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.jps.build + +import org.jetbrains.jps.incremental.CompileContext +import org.jetbrains.jps.incremental.messages.CompilerMessage + +fun jpsReportInternalBuilderError(context: CompileContext, error: Throwable) { + KotlinBuilder.LOG.info(error) +}
\ No newline at end of file diff --git a/plugins/allopen/allopen-ide/src/AllOpenMavenProjectImportHandler.kt.as42 b/plugins/allopen/allopen-ide/src/AllOpenMavenProjectImportHandler.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/plugins/allopen/allopen-ide/src/AllOpenMavenProjectImportHandler.kt.as42 diff --git a/plugins/annotation-based-compiler-plugins-ide-support/src/AbstractMavenImportHandler.kt.as42 b/plugins/annotation-based-compiler-plugins-ide-support/src/AbstractMavenImportHandler.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/plugins/annotation-based-compiler-plugins-ide-support/src/AbstractMavenImportHandler.kt.as42 diff --git a/plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as42 b/plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/plugins/kotlin-serialization/kotlin-serialization-ide/src/org/jetbrains/kotlinx/serialization/idea/KotlinSerializationMavenImportHandler.kt.as42 diff --git a/plugins/noarg/noarg-ide/src/NoArgMavenProjectImportHandler.kt.as42 b/plugins/noarg/noarg-ide/src/NoArgMavenProjectImportHandler.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/plugins/noarg/noarg-ide/src/NoArgMavenProjectImportHandler.kt.as42 diff --git a/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverMavenProjectImportHandler.kt.as42 b/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverMavenProjectImportHandler.kt.as42 new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/plugins/sam-with-receiver/sam-with-receiver-ide/src/SamWithReceiverMavenProjectImportHandler.kt.as42 |