Commit Graph

153 Commits

Author SHA1 Message Date
Andrew Kozlov
db20365a88 [kotlin] KTIJ-28619, KTIJ-29920 tests regenerated
GitOrigin-RevId: 891cf8d98d2da43f69a7c56b790e3955aacb16b4
2024-05-27 19:05:42 +00:00
Gregory.Shrago
04d585910f avoid relying on beforeActionPerformedUpdate in tests
GitOrigin-RevId: 89df0c2a9e7ae175ad18fd7f20a3217842781d21
2024-02-13 01:04:31 +00:00
Vladimir Krivosheev
11a8751859 use kotlin.io.path.invariantSeparatorsPathString
GitOrigin-RevId: 4ee2eccc21ae3de6c13c1062ef4e80da48c0435b
2024-02-09 06:56:39 +00:00
Andrei.Kuznetsov
1a0a0bfddd IJPL-578 Explicitly wait for smart mode in tests (testFramework/Kotlin)
GitOrigin-RevId: 0506b3886715a92e54bda40ef640116db2c81c65
2024-01-31 00:01:16 +00:00
Marco Pennekamp
b00dce942e Merge '2ed9cc0adb09' into 'master'
GitOrigin-RevId: 4f0e5d5c5465fae1dce59d136164adc4508b9db6
2024-01-17 11:59:21 +01:00
Anna Kozlova
70910a1bf9 [kotlin] extract frontend agnostic kotlin.ide module
it supposed to contain ide/ui specific actions which are shared between k1 and k2

part of KTIJ-28142

GitOrigin-RevId: 9ee0d5808a80ab36d9c0aa4176a1633f48e482c4
2024-01-12 20:55:16 +00:00
Andrei Klunnyi
115a85167f [kotlin][scripting] KTIJ-28405: remove outdated code
After IDEA-335705 is complete we can remove the code
used as a workaround.

GitOrigin-RevId: db2a1ee3ff0a8f87f20dab9ad5c23c812fce038d
2024-01-10 19:31:16 +00:00
Marco Pennekamp
b98d496f58 [kotlin][k2] Refactoring: Move AbstractProjectStructureTest to kotlin.test-framework
- This allows other modules to use `AbstractProjectStructureTest` as a base.
- The `kotlin.base.test` module would be a better candidate for `AbstractProjectStructureTest`, but this would require moving a lot of dependencies, as it relies on `AbstractMultiModuleTest`.

^KT-62895

GitOrigin-RevId: 10212f45f8b40acfd792dc675dd472be3aa358a3
2024-01-10 11:47:33 +01:00
Ilya Kirillov
f7d238defc [kotlin] fix circular dependency between modules kotlin.tests-common:resources_test, kotlin.base.test:resources_test, kotlin.fir.frontend-independent.tests:resources_test
- Move `IgnoreTests`, `InTextDirectivesUtils` from kotlin.fir.frontend-independent.tests` to `kotlin.base.test` module

GitOrigin-RevId: 6df818df2d92f2740386095b240d29b29f23c817
2024-01-08 23:15:29 +00:00
Dmitrii Gridin
bf49f9e21d [kotlin] regenerate tests for 2024
GitOrigin-RevId: 48215f9ecb7d1a85481bcfad203e8c73e0c5a907
2024-01-01 11:38:00 +00:00
Ilya Kirillov
a2bbe4d318 Remove snapshot kotlin stdlib from Kotlin plugin
^KT-62510
^KTIJ-20529 fixed

GitOrigin-RevId: a49099902566abb23dfb56a578b368b4973e332f
2023-10-20 20:53:09 +00:00
Alexander.Danilov
a9ac8b5fad [kotlin] run line markers test with navigation in K2, remove obsolete usages of assertNavigationElements
(cherry picked from commit 33ca73be67a6ef43b79c038a44b96d9bd4f6ab1d)

GitOrigin-RevId: ddc072038ac406cf76f8d34e26d1748e0cf5f8b5
2023-08-05 22:04:53 +00:00
Vladimir Dolzhenko
212b4c1a47 [kotlin] Regroup highlighting modules
GitOrigin-RevId: 85a48fd2aec4fb321cec2d0c24d032274dc98b28
2023-08-02 07:43:51 +00:00
Ilya Kirillov
04c161258a [kotlin] use K1 for scratch tests, we do not plan to support scratches in K2 IDE
1.9 should be the default LV in all K1 tests after the migration of default LV to 2.0 in the Kotlin Compiler

^KT-60603

GitOrigin-RevId: 0610d1b9635a7c3cbf281e67ded50f8576950e78
2023-07-28 12:58:57 +00:00
Alexey Belkov
abf213b54a Apply Kotlin "String concatenation that can be converted to string template" inspection on whole project
GitOrigin-RevId: 3da86881c82ea8aca0081cff955cf0d15a15c691
2023-05-24 16:04:38 +00:00
Vladimir Dolzhenko
494a390b47 [kotlin] Fix kotlin script related test data
As of Kotlin 1.9 script analysis within a source root is forbidden.
It has to be enabled with a special compiler flag as test is a module AND a source root.

GitOrigin-RevId: 36d83eea673ac5aefe6441915f2760e11f829931
2023-02-07 17:19:59 +00:00
Vladimir Dolzhenko
b83e134b48 [kotlin] Update copyright
GitOrigin-RevId: fdf5f33bc5b58b3dbcad58b8e5516871e014121f
2023-01-02 12:48:27 +00:00
Anna Kozlova
4657617439 [line markers] reuse goto implementations for gutter navigation
GitOrigin-RevId: c6cc57b8cf1c550003aa986640ed2ccd5a49d271
2022-12-09 14:47:21 +00:00
Gregory.Shrago
60dfc9d563 TestActionEvent cleanup 2
GitOrigin-RevId: 617de5980bcee07a7ad4c213039cc5684dac666e
2022-11-25 04:38:25 +00:00
Vladimir Dolzhenko
7ad533ed0f [kotlin] Rearrange imports
To prevent cherry-pick conflicts with master and release branches

#KTIJ-23483

GitOrigin-RevId: 11999b75e79f2373b69045777aece61d198c16e7
2022-11-07 16:17:33 +00:00
Vladimir Dolzhenko
f75f8c536b [kotlin] Migrate code to use utility functions from IntelliJ platform instead of Kotlin duplicates
#KTIJ-23483 Fixed

GitOrigin-RevId: 8aa2bb837ba968239559781c36fd53a10c6c83d4
2022-11-04 22:45:17 +00:00
Stanislav Erokhin
61665741e4 [kotlin] Update testdata for ScratchRunActionTestGenerated
Related commit in kotlin: b36d1be5f858fe09f673c7568fa97d3028ec5c6e and commits around

 ^KTIJ-22367

GitOrigin-RevId: 8d0668ec79b729d9a3529de6df6a2b5698af42fb
2022-10-03 18:47:37 +00:00
Nikita Bobko
4b96fbc32f [Kotlin] Avoid NoClassDefFoundError in tests by converting fields to methods
^KTIJ-22768 Fixed

Convert fields to methods in three classes:
* KotlinWithJdkAndRuntimeLightProjectDescriptor
* TestKotlinArtifacts
* ProjectDescriptorWithStdlibSources

This commit breaks `testChangeParameterTypeExpectFunction` test.
Actually, the test was broken before this commit. But it wasn't visible
on CI because if you run all the tests in
`KotlinSuggestedRefactoringTest` then the test is green. It happens
because of the side-effects caused by other tests in the test case.

I will fix `testChangeParameterTypeExpectFunction` in the next commit.

GitOrigin-RevId: 499da37800effac51efe5bf0a6b430231b49fb1a
2022-09-27 16:17:00 +00:00
Yan Zhulanow
4a3ecdebed [kotlin] Move base test classes to the 'kotlin.base.test' module (part 1)
GitOrigin-RevId: 7f77e95e54919243ded4b4a300b5f9a74b8a4068
2022-08-19 20:59:55 +00:00
Nikita Bobko
2fed68d853 Drop kotlin-reflect artifact from Kotlin plugin
Review: https://jetbrains.team/p/ij/reviews/94196

^KTIJ-22276 Fixed

In Kotlin compiler we are going to use kotlin-reflect which is the same
as in Kotlin plugin minimally supported IDEA (which is Android Studio).

We are going to migrate to "old reflect" in Kotlin in those commits:
https://jetbrains.team/p/kt/reviews/6753

Since the Kotlin compiler will depend on "old reflect" it's safe to use
IDEA's reflect in Kotlin plugin and compiler classpath.

This commit should fix FL-11828

GitOrigin-RevId: 4341c860073e7517d5e186f9ec18114f3f7987b2
2022-08-15 12:57:44 +00:00
Vladimir Dolzhenko
3c55070308 [kotlin] Add more cancellation checks
GitOrigin-RevId: 3874c9a3da8021d06e9a7f2e3b3bc0cdc336c946
2022-07-28 17:32:29 +00:00
Nikita Nazarov
4430b3bfe9 [kotlin] update copyright
GitOrigin-RevId: 9ac8c77e434655b5858bfa08c4dcc87395e9d39a
2022-07-28 16:57:08 +00:00
Mikhail Zarechenskiy
762fbfc3cf [kotlin] update test data after analyzer update
GitOrigin-RevId: e3ccc9b7bbec554ed02d51e8f002b985ddf70748
2022-07-26 14:08:13 +00:00
Stanislav Erokhin
1b180bcc78 [kotlin] Update testdata for ScratchRunActionTestGenerated
Related commit in kotlin: b36d1be5f858fe09f673c7568fa97d3028ec5c6e and commits around

GitOrigin-RevId: bce6999129df49127b56572fb8bbed469094ee71
2022-07-19 11:45:38 +00:00
Nikita Bobko
5a22529818 Kotlin: Migrate KotlinArtifacts -> TestKotlinArtifacts in (almost) all test sources
KotlinArtifacts is kotlinc jars from bundled JPS
TestKotlinArtifacts is kotlinc jars from bundled JPS

KTIJ-21822 WIP

In the commit next after the next the migration of the rest of the
usages will be performed.

This commit breaks a couple of tests. See the next commits for the
fixes.

GitOrigin-RevId: fe1036c5ed88449b5491676a1898c1e418c4689d
2022-07-18 11:41:54 +00:00
Vladimir Krivosheev
274302d17e fix file editor manager tests
GitOrigin-RevId: 66f0b72ece14c9834c70d9dfbd5566f49b911c61
2022-07-13 10:23:37 +00:00
Ilya Kirillov
453eae19e2 [kotlin] fix mixed K1/K2 test in aggregator
^KTIJ-22193

GitOrigin-RevId: 73c8b458fb6de45c44106aa03df0c65f55d925cb
2022-07-09 23:07:02 +00:00
Yan Zhulanow
b6c433c1fa [kotlin] Forbid exporting 'kotlinc.*' dependencies (KTIJ-21699, KTIJ-22014)
As the plugin gradually becomes separated to common and frontend-dependent parts, it is important to understand which modules use the old frontend. Without dependency exporting, figuring it out becomes a trivial task.

GitOrigin-RevId: 6ef2da11b5e6f03b38b325fa0824bd79935eff29
2022-06-15 06:45:43 +00:00
Yan Zhulanow
0ab3b6ca27 [kotlin] Move highlighting-related classes to the 'kotlin.base.highlighting' and 'kotlin.base.fe10.highlighting' modules (KTIJ-21699)
GitOrigin-RevId: 20a4ec05092e7a2d09af4d3994fbea6872433afc
2022-06-14 06:28:25 +00:00
Yan Zhulanow
744f79332d [kotlin] Simplify KotlinArtifacts API (KTIJ-21699)
GitOrigin-RevId: c10b48fb4f41cbc070586b274ecc0d73b82bf737
2022-06-14 06:28:16 +00:00
Yan Zhulanow
40f0c96540 [kotlin] Move artifact-related stuff to the right package in the 'kotlin.base.plugin' module (KTIJ-21699)
GitOrigin-RevId: 11b9e1fbbd0d5d6b134da3b6ecbea70dc3ca88fe
2022-06-14 06:28:13 +00:00
Yan Zhulanow
00e8ff1c70 [kotlin] Extract classes related to analysis and project model handling to base modules (KTIJ-21699)
GitOrigin-RevId: 6c28e30f796068b6c9c843e367c7a0f9ff42ad68
2022-06-14 06:28:05 +00:00
Yan Zhulanow
a9de3e25f1 [kotlin] Remove 'kotlin.common' module (KTIJ-21699)
GitOrigin-RevId: 4ab36f052c63b9b37bd114b07f69b985a9472360
2022-06-14 06:27:51 +00:00
Gregory.Shrago
f4b800ee7e do not mix DataContext and DataProvider in one class
GitOrigin-RevId: d8c8e9c204c7267a956272af6687d8b8517e8701
2022-06-07 22:30:47 +00:00
Alexey Belkov
8d0c00e7e4 Run Kotlin inspection "Redundant semicolon" on whole project
GitOrigin-RevId: f747f82c4e72f73070d6863fabed31dabf87ad0a
2022-05-23 21:37:20 +00:00
Bart van Helvert
bb40f653b8 Fix malformed test inspection violations
Method names that start with `test` in a JUnit 3 test case should be runnable.

GitOrigin-RevId: 6235b8a8380aa6e3819849e0f51ded7e4ae18af6
2022-05-13 16:27:53 +00:00
Yan Zhulanow
c4b2d3f7db [kotlin] Move Application-related helpers to the 'kotlin.base.util' module
GitOrigin-RevId: cb6b1857efb3943ce4014087b632f9ddc82ee980
2022-04-15 19:39:10 +00:00
Yan Zhulanow
8438013494 [kotlin] Extract plugin-related utilities to the 'kotlin.base.plugin' module
GitOrigin-RevId: 3b64666cf5769ca3a08beba186631e0fb9a2b319
2022-04-15 19:38:58 +00:00
Yan Zhulanow
25c00a5623 [kotlin] Introduce kotlinc.kotlin-script-runtime
As 'kotlin-script-runtime' is also used by the Python plugin, it's not possible to safely advance it to a bootstrap version. So, like with kotlinc.kotlin-stdlib and kotlinc.kotlin-reflect, the new 'kotlinc.kotlin-script-runtime' library comes as a Kotlin-local replacement.

GitOrigin-RevId: 636cb90eac3d8bb516946a27247ce5860b693146
2022-03-17 15:34:56 +09:00
Yan Zhulanow
669afc9afa [kotlin] Remove unneeded kotlin.scripting-compiler
The library is not used anywhere in the plugin, it was added by mistake as a (false) counterpart of kotlin-scripting-compiler-impl. See 4a9d4e06b99dbfe794b3072b59aec559381ecdcf for more information.

GitOrigin-RevId: 9bb9579dd02e0e33b42a15ba180102d88d2eee35
2022-02-08 08:52:50 +00:00
Yan Zhulanow
a73802740f Split kotlinc.kotlin-compiler library to common/fe10/fir/ir
GitOrigin-RevId: 6611c04934c6d6623d7a892ed41e957dc90b69fd
2022-02-08 08:51:09 +00:00
Stanislav Erokhin
2b8a822ede Remove dependency to the kotlinc.kotlin-script-util in the plugin
This jar file is deprecated and contains dependency to the
com.jcabi.aether.Aether class. This class could be not present in the
IDE plugin classpath, and we've got error via  IntelliJ Plugin
Verifier about that

Co-author: Ilya Chernikov

GitOrigin-RevId: 7ec1909ece745810312f78e7d4caf81ec6ac3716
2022-01-22 11:10:50 +00:00
Yan Zhulanow
d4eca5f893 Fix remaining compilation issues after commit cherry-picking
GitOrigin-RevId: 4b3e45ab04ce85b19523d4c21b0e8434dceb67ed
2022-01-22 10:56:47 +00:00
Nikita Bobko
f305e773dc tests-common: move all classes in subpackage
tests-common was copy-pasted from kotlin repo some time ago cause it had a lot of infrastructure
code inside and we needed to adopt this infrastructure code for new infra for Kotlin
plugin + intellij repo. Now kotlin created new test infrastrucutre `:compiler:tests-common-new`,
`:compiler:test-infrastructure`, `:compiler:test-infrastructure-utils` and FIR started depending
on it (pain screams). Some classes from `:compiler:tests-common` was moved to moduled of new
compiler infrastructure. In order to avoid FQN classes slashing let's move our `tests-common`
into subpackage

GitOrigin-RevId: 4ce8485ca94d27c304c1fc9f08ecb1bc8a10ddbe
2022-01-22 10:56:41 +00:00
Dmitry Gridin
71f4d7930a [kotlin] regenerate tests to update year
GitOrigin-RevId: 97d0dee40e59688047084858f48c8d467117983c
2022-01-02 11:25:17 +00:00