128 Commits
Author SHA1 Message Date
Vladimir Dolzhenko f36778006d [kotlin] Align K2 test data file names
#KTIJ-29583

GitOrigin-RevId: 150fae6655bde2c4b7120edf2223c3112a4f2121
2024-07-13 18:32:27 +00:00
Alexey Kudravtsev 7e5486b193 K2: implement creating class from delegation specifier with arguments (DelegationSpecifier test) (part of KTIJ-28671 K2: CreateClassFromUsageFix)
GitOrigin-RevId: 15507511695328abebeee94d1b0a66358a77180f
2024-07-01 15:47:08 +00:00
Alexey Kudravtsev 2efebb95e5 K2: fix tests (part of KTIJ-28671 K2: CreateClassFromUsageFix)
GitOrigin-RevId: 3f748402358152ab866c2ca35bad1d528f98082b
2024-06-27 15:44:12 +00:00
Alexey Kudravtsev 3ddfc2f8b6 K2: implement generating open class for some delegation specifiers (for test DelegationSpecifier in K2CreateClassFromUsageTest) (part of KTIJ-28671 K2: CreateClassFromUsageFix)
GitOrigin-RevId: d74118f682e9b5bd118de32136f13bba91887f65
2024-06-27 15:44:12 +00:00
Alexey Kudravtsev b274dc8b4e K2: support creating class from usage from type reference (part of KTIJ-28671 K2: CreateClassFromUsageFix)
GitOrigin-RevId: 8146c97a4f45b2a612445260bdcaec0818ae0ddb
2024-06-27 15:44:12 +00:00
Alexey Kudravtsev 48022d959e K2: support creating class from usage from import directive (part of KTIJ-28671 K2: CreateClassFromUsageFix)
GitOrigin-RevId: 47c044231f74811fc51a645c3c67814ae28cddf1
2024-06-27 15:44:12 +00:00
Alexey Kudravtsev 6d19a02658 K2: implement "create class from reference expression" in java class quickfix (part of KTIJ-28671 K2: CreateClassFromUsageFix)
GitOrigin-RevId: 53945115192234f151d2647097819fa631ee8471
2024-06-26 14:28:14 +00:00
Alexey Kudravtsev 73f59a5ba3 initial "create class from reference expression" implementation (part of KTIJ-28671 K2: CreateClassFromUsageFix)
GitOrigin-RevId: 9905eaf74f661f796688c7b480d2ef1a9334224d
2024-06-26 14:28:09 +00:00
Alexey Kudravtsev 9ef2960d8f prepare test data for K2 tests (part of KTIJ-28671 K2: CreateClassFromUsageFix)
GitOrigin-RevId: b6e8fd81db2e87043e95a8c138b1c4af02d8ba23
2024-06-12 16:58:36 +00:00
Alexey Kudravtsev 060dd758de remove "//ACTION" directives from "create from usage" test data
- to be able to reuse testdata for K2 quickfixes
- remove (wrong, implicit) dependencies of K2 "create from usage" tests on unrelated quickfixes
"// ACTION" directive has new contract now: If there are no "// ACTION" directives in the testdata file, skip the check for available actions in this file altogether.
(part of KTIJ-26893 K2: Create*FromUsageFix fix)

GitOrigin-RevId: 51b0bc82d334c427b4d83bc6a7b87f39ecd21ae6
2024-02-01 16:08:07 +00:00
Vladimir Dolzhenko bab54c6d29 [kotlin] Improve test coverage of collected FUS quickfixes data
#KTIJ-389

GitOrigin-RevId: c8554b77a988a77484d1dada64353345b7a1fa35
2023-07-20 05:59:17 +00:00
Alexey Belkov 98c5dd2a8b [kotlin] Unify names of String intentions
GitOrigin-RevId: 073001f58a6ab697b34cd3968b7d7de041e0267a
2023-04-11 11:07:12 +00:00
Vladimir Dolzhenko 65274fb0ce Update test data with enum entries
GitOrigin-RevId: 24e10c7ddff63f5df226e7483b5a47cb9fe4eaad
2023-02-03 14:44:02 +00:00
Dmitrii Gridin ce7d3767a0 [kotlin] implement "Put calls on separate lines" intention
^KTIJ-24022 Fixed

GitOrigin-RevId: f487e6878fa180d123890987251396ead63ddeff
2022-12-20 13:12:22 +00:00
Alexey Belkov 0dac2e3d60 [kotlin] rename "trait" to "interface" in testdata files
GitOrigin-RevId: 07fa5555d704a3cdf7cb3754486323fee83a0209
2022-11-23 07:43:21 +00:00
Mikhail Zarechenskiy 6bb2e4f62d [kotlin] Update test data after bundling new Kotlin JPS plug-in
The main issue here is that in tests we are using stdlib from the default JPS (KTIJ-21822) and a lot of tests infer language version based on a stdlib version. As a result, a lot of tests changed because of switching LV from 1.6 to 1.7.

GitOrigin-RevId: 0eed6052bebcd53e2cb55daac7aad4a905bcc266
2022-05-30 20:27:42 +00:00
Vladimir Dolzhenko 89c42862f8 [kotlin] Fix test data for irrelevant show return expression hints intention
#KTIJ-214

GitOrigin-RevId: 7ccfd925801d0de45116088840878da3c6d77591
2022-05-18 03:16:41 +00:00
Vladimir Dolzhenko 1a3d9b66e8 [kotlin] Add intention to show/hide Kotlin inlay hints
#KTIJ-214 Fixed

GitOrigin-RevId: 2b6ce81d05664f6587d3491fa3ce1b58393203c6
2022-05-07 18:05:56 +00:00
Yan Zhulanow ad9c054712 Revert "[kotlin] Update test data for 'QuickFixMultiFileTestGenerated', exposed type in constructor"
This reverts commit e49e2eb2644e353ed519e16c9fd312f39dc278c9.

GitOrigin-RevId: 75a210df1c8cb607843fc1a89f3a4b4407647d4f
2022-04-06 09:15:33 +00:00
Yan Zhulanow 6e79cc9c55 Merge commit 'c75437a2d63ac85c594464f5ea1d31d66af0afe4'
GitOrigin-RevId: 2e58db3830f605d6e835864e02d3a641cc4cd8af
2022-04-06 09:14:52 +00:00
Dmitry Gridin bd51e7a671 [kotlin][tests][quickfixes] update testData
GitOrigin-RevId: 0b9dddda0be38819fad3802cdbb3c8b7fb795ebe
2022-03-23 09:10:56 +00:00
Yan Zhulanow 9e2e2a7998 [kotlin] Update test data for 'QuickFixMultiFileTestGenerated', exposed type in constructor
Exposed private constructor parameter type became an error in Kotlin 1.7 (see KT-28078). This commits adapts test data to this change.

GitOrigin-RevId: 8076d76f5bc86b99ca5429d419cb234aec69fdfb
2022-03-17 15:40:25 +09:00
Roman Ivanov 8e4432cad6 [java, inlays] fix test data
GitOrigin-RevId: a37143681ee6af4facad90b2c8909f578e78cbdd
2021-11-23 16:02:41 +00:00
Ivan Kylchik 156ff92845 [kotlin:testdata] Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive in kotlin test
infrastructure. The main reason behind this change is that
`WITH_STDLIB` directive better describes its meaning,
specifically it will add kotlin stdlib to test's classpath.

GitOrigin-RevId: 73a702b404ed63e728ad85fa750d5d87ce5bc7f4
2021-11-19 19:27:17 +00:00
Toshiaki Kameyama 0858d1c13b [kotlin] Create from usage: suggest for companion member/extension even if class has no companion object
#KTIJ-5953 Fixed

Related tests:
testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithQualifier.kt
testData/quickfix/createFromUsage/createClass/referenceExpression/classWithQualifier.kt
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$AddSpreadOperatorForArrayAsVarargAfterSam.testWithError
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateClass$ReferenceExpression.testEnumEntryWithJavaEnumQualifier
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateClass$ReferenceExpression.testEnumEntryWithJavaEnumSuperclass
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateClass$ReferenceExpression.testEnumEntryWithJavaNonEnumQualifier
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateClass$ReferenceExpression.testEnumEntryWithJavaNonEnumSuperclass
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateClass$ReferenceExpression.testObjectWithJavaQualifier
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateFunction$Call.testStaticExtensionFunOnJavaClass
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateVariable$PrimaryParameter.testStaticValOnJavaClass
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateVariable$Property.testStaticExtensionValOnJavaType
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateVariable$Property.testStaticValOnJavaClass
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateVariable$Property.testStaticValOnJavaInterface
org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated$CreateFromUsage$CreateVariable$Property.testStaticVarOnJavaInterface
org.jetbrains.kotlin.idea.quickfix.QuickFixTestGenerated$AutoImports.testImportEnumValueMissingReceiver
org.jetbrains.kotlin.idea.quickfix.QuickFixTestGenerated$AutoImports.testImportFunctionMissingReceiver

closes https://github.com/JetBrains/intellij-community/pull/1613

GitOrigin-RevId: 3926169cf0980c60fd450ad48d140a9b88f7d3a1
2021-11-10 12:35:55 +00:00
Ilya Kirillov 6ff8e7e679 Fix testdata after adding string template -> buildString intention
GitOrigin-RevId: aab6110fcbe99d87308c2cd2f6a506b6a9cac419
2021-03-19 17:33:28 +03:00
Toshiaki Kameyama 35aaf1fc6f KT-22665 "Create object" quick fix produce wrong code for enum (#2883)
* "Create object" quick fix: do not suggest for enum

^KT-22665 Fixed

Original commit: 330502a0a654fc02d7e2abb303b0045fbb670376

GitOrigin-RevId: 9f0f5c6645ddacfbad91f6d61ed6e7c6cbfd79d3
2020-10-01 14:33:04 +03:00
Toshiaki Kameyama 0981a22006 "Create enum constant" quick fix: suggest if expected type is Any
^KT-22666 Fixed

Original commit: 14bdcb1e26f83d075cdb6481756f706fd1c91b6c

GitOrigin-RevId: 9606570124ea165c90e7dd499e7af708de158253
2020-10-01 14:33:03 +03:00
Toshiaki Kameyama baa2d3b1b0 "Create class from usage": add visibility to primary constructor if needed
^KT-29844 Fixed

Original commit: efa981db36eebc629b668e020592ab0eb0f8e239

GitOrigin-RevId: 57d9d266fab3fe8f1d3702bfbefc3c9d1aa1e15c
2020-08-15 01:20:40 +03:00
Dmitry Gridin 16afede858 Fix testData for CreateFromUsage
GitOrigin-RevId: 652d2074cdba6fd58e25248ab9101fd1b81c0994
2020-07-21 15:42:21 +03:00
Toshiaki Kameyama 0d4676910a Create class quick fix: suggest on supertype entry
#KT-32511 Fixed

Original commit: 21d6d5024137bfabcce9671d69d7918a503de103

GitOrigin-RevId: 34ce74851e14a2eb2436b867c6a219272f07a7d2
2020-06-03 18:55:55 +03:00
Toshiaki Kameyama b9a16e36fd "Create enum constant" quick fix: handle trailing comman correctly
#KT-36461 Fixed
#KT-36462 Fixed

Original commit: 4973d3c359ecadb2a3cfe26de135c8a150413050

GitOrigin-RevId: 6480acee10cd5e88cfdc4bbb74cf583e4a43fff5
2020-06-03 18:55:55 +03:00
Yan Zhulanow 6f91376c53 Remove as36 bunch
GitOrigin-RevId: 65d06150b5f4cd4d94a28ab8066e4441a8145c02
2021-02-07 19:18:39 +03:00
Dmitry Gridin 99a44564b1 Tests: fix test for AS 3.6
GitOrigin-RevId: 336d8a493e288be74e6b175bddcbcde203032d91
2020-02-27 11:39:27 +03:00
Toshiaki Kameyama 92cfbfdd0f Add "Remove argument" quick fix for TOO_MANY_ARGUMENTS
#KT-34026 Fixed
#KT-34332 Fixed

GitOrigin-RevId: faf6b917e164a43448fe315fd712f54f9541025a
2020-02-23 12:17:10 +03:00
Dmitry Gridin ba29798180 Create TrailingCommaIntention
#KT-34744

GitOrigin-RevId: 6b238ed64cd7724cdd96b4d14693cc33327ba0ad
2020-02-04 17:34:53 +03:00
Toshiaki Kameyama 221a91cd24 "Create enum constant" quick fix: add before semicolon
#KT-33718 Fixed

GitOrigin-RevId: 378aebc000b88754c3d42604641742e50bcb4123
2019-09-24 15:31:52 +03:00
Toshiaki Kameyama 7c8763c3a7 "Create enum constant" quick fix: do not add redundant empty line
#KT-32981 Fixed

GitOrigin-RevId: af92e8fec16459a2bee5c9189e09230878c5727c
2019-09-24 09:23:06 +03:00
Igor Yakovlev 5b74c46646 Fix invalid testdata for ConvertToScopeIntention applicability
GitOrigin-RevId: 1d3da2814fc7a34412ceaa088739fd45c6aa90ba
2019-08-28 16:31:49 +03:00
Dmitry Gridin 68b6595989 Remove CreateTypeAliasFromUsageFix
Relates to #KT-31519

GitOrigin-RevId: 67b131ce9b77de4d0d47391218b8a8b2503ce02d
2019-05-31 14:00:56 +03:00
Dmitry Gridin 0c1afb54b1 Allow "Create class" action in return statement
#KT-22137 Fixed

GitOrigin-RevId: 3886b81ff15e70bffcdfbed728575c21e1358545
2019-03-15 13:33:14 +03:00
Dmitry Gridin c87e0e5184 Move caret to class name after creating it from "CreateFromUsage" action
Relates to #KT-24631

GitOrigin-RevId: 3fdb52d66a7494dc16be4f1fd0c062de9f7d83de
2019-03-15 13:27:06 +03:00
Mikhail Glukhikh da4b586683 Fix a bunch of IDE quick-fix tests (related to "convert to run/...")
These actions became available more often some days ago

GitOrigin-RevId: 9bce6f08047ecfa8107dd2475f5a54787a2fb6b9
2019-02-25 10:37:46 +03:00
Mikhail Glukhikh 66bcb02cdb Remove SHOULD_FAIL_WITH from testQuotesName thus fixing it
GitOrigin-RevId: 1a47bf3c3b27e57b0df6aebd9a2893e746f882c1
2018-09-18 11:50:37 +03:00
Mikhail Glukhikh 9d0b89fccf Add language version 1.2 to quick-fix tests for add explicit import
This fixes tests for KT-21515

GitOrigin-RevId: 22a4b83e43b7a29223db3bb057ebb060e35bfb40
2018-09-18 11:50:33 +03:00
Mikhail Glukhikh 2d4154d7b4 Fix erroneous full resolve cache filling
Before this commit, we could store partial resolve results in full
resolve cache (for some declarations, e.g. primary constructors).
This may be done iff current partial resolve mode provides all results
from full resolve mode (CFA results & diagnostics).
Otherwise we should not do it.

This fixes four quick-fix tests on CreateTypeParameter
So #KT-23860 Fixed
So #KT-22758 Fixed

GitOrigin-RevId: a3ad60b5f5c9c1e231e43cff12750fb15b6bc865
2018-06-20 17:18:18 +03:00
Alexey Sedunov 2a40a37c61 Create Class from Usage: Filter out usages in super type entry list
#KT-22918 Fixed

GitOrigin-RevId: 28db8766d08a720a52183154694e054d332bcbe7
2018-05-25 23:03:26 +03:00
Dmitry Savvinov a1e8410bc8 Introduce deprecation of companion objects nested classes
Introdude deprecation as per KT-21515. Warning is reported on type
usage, that soon will became invisible. Quickfix by adding explicit
import is added.

Idea behind implementation is to mark scopes that are deprecated (see
ClassResolutionScopesSupport).

Then, during walk along hierarchy of scopes, look at deprecation status
of the scope that has provided this classifier.
Note that we also have to check if there are *some* non-deprecated
visibility paths (because we can see classifier by two paths, e.g. if
we've added explicit import) -- then this type reference shouldn't be
treated as deprecated.

GitOrigin-RevId: 95c0408b77d144b2f7a4731c6319e631c02df7c0
2018-02-21 16:04:49 +03:00
Alexey Sedunov 24ad1bb37a Create from Usage: Fix "Create class" applicability check for when entries
#KT-22329 Fixed

GitOrigin-RevId: da1cf86df10b5a83d908449f17bf20dec1be2dfc
2018-02-21 13:21:17 +03:00
Mikhail Glukhikh 5b79f358bd Fix "create enum constant" test (create type alias is no longer here)
GitOrigin-RevId: b2c18908f032648113bdd23d67d9d5e7b93097c4
2018-01-31 13:56:07 +03:00