Commit Graph

1490 Commits

Author SHA1 Message Date
Alexey Kudravtsev
6cb319cbbc more immutable collections: mark transitive callees of ContainerUtil.filter() as Unmodifiable to help uncover "immutable is passed where mutable is expected" bugs via "data flow problems" inspection, fix some found bugs
GitOrigin-RevId: c9b57bd0bd8fadcbaf7cca373c2aefbf562ecd4b
2024-11-18 16:57:58 +00:00
Maksim Zuev
c11d11ade8 [debugger] IDEA-350301 Refactor: migrate from DebugProcessImpl.getManagerThread
GitOrigin-RevId: aeb58d697d0a0d841958798690dfcf8dff538fc4
2024-11-15 13:16:54 +00:00
Anton Kozub
b36448d8dd IDEA-362283 Spring Structure: correctly display the @Named beans (test)
GitOrigin-RevId: 54bed23ff2ae4c5f876ac3ca57335c7e0976d77f
2024-11-15 02:36:47 +00:00
Anton Kozub
63032422b9 IDEA-361348 Spring Structure: inconsistent representation of @Bean methods
GitOrigin-RevId: 543f5219ac51fea0a6d1c0a50745a34460bc125f
2024-11-15 02:36:47 +00:00
Andrzej Głuszak
cbca664f6c [bazel] Second attempt at generating tests
GitOrigin-RevId: 7763c9994b7c311310b83b98a542775feb00ed68
2024-11-09 11:06:41 +00:00
Marco Pennekamp
08a316200f [PSI] Honor global search scope when searching class names contained in a PsiPackage
- Previously, `getClassNames` only considered the scope for finding directories, but a directory might contain files which are and aren't part of the scope, such as a scope which only accepts Java files.
- This change is also an optimization since it avoids loading PSI files which aren't in the scope to begin with. For example, without this optimization, `PsiElementFinderImpl.getClassNames` loads Kotlin light classes even when the scope already excludes Kotlin files.

^IJPL-165129 fixed
^KTIJ-24642

GitOrigin-RevId: cf7ba0ab36e713583d81ae0a83b847f8d0155f44
2024-11-05 18:39:42 +00:00
Gregory.Shrago
402acf04ff IJPL-164584 Skip DUMB_EMPTY_INDEX with no dumb checks 2
GitOrigin-RevId: cf36a279eb8c57beb85fe4c82b7318678fb7ab0f
2024-11-05 15:46:15 +00:00
Gregory.Shrago
f2294b3585 IJPL-164584 Skip DUMB_EMPTY_INDEX with no dumb checks
GitOrigin-RevId: d2196ad1d5e72d01b0e38f9d3b37794afb65af04
2024-11-01 18:42:30 +00:00
Dmitry Batkovich
ba73c95141 IJPL-164043 cosmetics
* use slightly green
* fix intention text to make it shorter

GitOrigin-RevId: 43cd294028d704802531b792d8c4337f923d07b5
2024-10-28 22:11:10 +00:00
Alexey Kudravtsev
3622cf6fce highlighting diagnostics: more places to specify reason for restart
GitOrigin-RevId: 623a39346c47a04efc2f13076f8591b701554ee7
2024-10-28 13:30:39 +00:00
Alexander Kuznetsov
37099edde2 [debugger] IDEA-352355 Add tests
GitOrigin-RevId: 79aafa316673ea9974921320116ccb5401b818fa
2024-10-18 14:28:30 +00:00
Egor Ushakov
b281b92e5b [debugger] use DebuggerUtils.findMethod pt.2
GitOrigin-RevId: f83c4b1ffce05dc64dcef85eb4f293027113e7ab
2024-10-17 14:19:16 +00:00
Vladimir Krivosheev
86b2d9ecc9 IJPL-162718 cleanup
GitOrigin-RevId: 615377bb04f43e515306d583ddf2701fc8aae674
2024-10-14 22:49:12 +00:00
Tagir Valeev
09bd11efd8 [java-refactoring] IDEA-71792 Support inlining of abstract methods having one implementation
GitOrigin-RevId: 00491acff53aff96705a866e0d799dfe22873d23
2024-10-11 08:10:27 +00:00
Vladimir Krivosheev
4a176d4c02 IJ-CR-146078 extract intellij.platform.bootstrap
GitOrigin-RevId: b79efc92829111228e83058e54381d8e02116b6f
2024-10-05 22:01:55 +00:00
Alexander Kuznetsov
60683a8131 [debugger] IDEA-352355 enable by default
GitOrigin-RevId: 4406de03ae4f9fa55471fb6f1f39a7518154028c
2024-10-04 00:30:06 +00:00
Egor Ushakov
84910492b8 IDEA-360126 Memory leak in com.intellij.rt.debugger.agent.CaptureStorage.ConcurrentIdentityWeakHashMap - disabled exceptions instrumentation
GitOrigin-RevId: 6f325e954fecceeb70e022e7f887f23f729a73f7
2024-10-03 19:09:08 +00:00
Aleksandra Zdrojowa
e22fc5b2ae [TestFramework] refactor: extract waiting for configuration to a common protected method
GitOrigin-RevId: 2b4fd813c070d028682ab47d6e3d61181dce4ee1
2024-09-27 17:27:09 +00:00
Vladimir Parfinenko
3cc1a51027 [debugger] simplify instantiation of Java exception breakpoint
GitOrigin-RevId: c1aa7e80470640041817cfb7500ab2ac61f5305a
2024-09-26 13:42:38 +00:00
Sergei Vorobyov
fa1bf0583e [PSI] new: added collecting uncommited documents traces when they become uncommited
This collection process is disabled by default. It is enabled by the `ide.activity.tracking.enable.debug` registry key.

GitOrigin-RevId: 9f9959f33cab6922869b57204f478f24ef82c198
2024-09-20 19:18:38 +00:00
Sergei Vorobyov
609f016002 [Observation] new: added dumping for all IDE tracked activities
GitOrigin-RevId: cab3332786669cb9face0bc91584b349c8f12f70
2024-09-19 14:53:14 +00:00
Sergei Vorobyov
7945329ed7 [TestFramework] new: added log with awaited project configuration operations
GitOrigin-RevId: 3019d2b041b095bd61d91c5d22145d29ebad49d9
2024-09-18 15:01:11 +00:00
Sergei Vorobyov
731e97a77c [TestFramework] cleanup: print operation dumps instead of providing them in the exception message
Exception message with thread dumps is too huge, but this message can be duplicated in re-thrown exception.

GitOrigin-RevId: fa9a355493fb0d600901836263f0cdfd32370157
2024-09-18 15:01:11 +00:00
Sergei Vorobyov
4b5a4a8a97 [NPW|Assets] fix: wait for project wizard tracked project configurations (Reformat code, VF and PSI file resolution)
Issues: IDEA-349863, IDEA-341180

GitOrigin-RevId: bf359aaea23f21c2843d17aab12c0bc656224190
2024-09-17 18:46:15 +00:00
Tagir Valeev
05de6a6bdb Less raw types
GitOrigin-RevId: 2a6e712b4017cf1ead7870543e562acb654fbeaf
2024-09-16 11:23:15 +00:00
Lev Serebryakov
a590af48da Reset all storage caches after usage of the compiler in tests.
Without cache resets FileBasedStorage.cachedVirtualFile can leak between to test suites and lead to "Alien file" AssertionError in random places.

GitOrigin-RevId: fecec191cf86e700dd6f6b80274613cc5c86259f
2024-08-12 23:16:44 +00:00
Max Medvedev
84186d3117 delete outdated Pass.WHOLE_FILE_LOCAL_INSPECTIONS
GitOrigin-RevId: 6a09bff0c8464359da1ea891cfec76ad4a04216b
2024-08-09 20:25:06 +00:00
Pavel Kirpichenkov
aae5c6cd9f [Kotlin] Don't check manifest properties in Kotlin JS stdlib detector
Use name matching as it's done for JVM stdlib.
Allows removing org.jetbrains.kotlin.utils.LibraryUtils in kotlin.git.

Changes:
— Remove LibraryUtils usage and supporting code
— Add tests for watershed versions
— Allow requesting KLIBs from MavenDependencyUtil for the new tests
— Workaround: extract VFGist used for KotlinLibraryKind from the service

A comment about the last workaround. StdlibJsDetectorFacilityTest revealed a
Project leakage. The project is captured by a coroutine context and is hard
referenced through ComponentManager by an application-level virtual file gist
cleanup task. The exact reference chain is not clear, but removing the gist
construction from the service prevents the leakage.

KTIJ-27969

GitOrigin-RevId: 7d6dbe93f4aa3125f5d204a81babcf8483874cb4
2024-08-06 20:45:59 +00:00
Anna Kozlova
fd7607ef38 [kotlin] k2 add tests for java interop
- disabled tests are reported as KT-70426, KT-70427, KT-70428
- call line marker messages in BGT, same as in production

KT-70404

GitOrigin-RevId: 7b368ad384d13b0a04053a3e666a4e43edf7e37c
2024-08-02 18:59:28 +00:00
Tagir Valeev
d82076a22c [java-tests] DfaAssistTest: run computeHints() in background
K2 doesn't allow running analyze() in EDT

GitOrigin-RevId: 5eb74f9cc5eccfb04c1afebf1fb560ca322c9755
2024-08-02 14:18:00 +00:00
Egor Ushakov
d20d4ac14d IDEA-343908 Flaky test com.intellij.debugger.impl.DebuggerSessionTest.testStateManager IJI-2040
GitOrigin-RevId: 8b1d8b6963c1dab0a12527a018e3d892fe0c5803
2024-07-17 19:12:50 +00:00
Nikolay Chashnikov
128b7b34df [tests] publish configs and build logs if a compilation test fails as build artifacts
This is needed to investigate IJPL-115184.

GitOrigin-RevId: 29df8e164b5fee6f2101190134fa989300b89e7b
2024-07-17 17:57:46 +00:00
Nikolay Chashnikov
26d4e1ddf6 [test framework] enable debug-level logging in build logs back
The old variant worked in log4j but didn't work since logging was to java.util.logging.

GitOrigin-RevId: 1211d833709e29235fef345c50e78f9653c124a8
2024-07-17 10:04:59 +00:00
Egor Ushakov
ecb5325121 [debugger] fixed flaky test PacketsNumberTest.testStepOverWithWatchReturnValue IDEA-354458 IJI-2040
GitOrigin-RevId: 1b5264dc453c9393893a2cfa4813be0bd492a609
2024-07-15 18:56:45 +00:00
Tagir Valeev
3b7c729f5a [testframework] Allow to specify custom repository for testing externally (PR#2800)
GitOrigin-RevId: 9a21d8710d87cf41fcae5dcbb6c7c1dfb6ba8cec
2024-07-15 11:13:01 +00:00
Tagir Valeev
9a2d6e2607 Use assertTrue instead of assert
GitOrigin-RevId: 83fdb15a53686fad4175a525032dfea14cb116e9
2024-07-10 11:21:11 +00:00
Mikhail Pyltsin
ab46a9f54a [java] IDEA-355569 Support JEP 455, 477. Reuse a new java language level
GitOrigin-RevId: 17969311436a766d25da0207ee236808084f308f
2024-07-04 15:25:05 +00:00
Nikolay Chashnikov
f3ab5a172e [jps build] provide a way to pass workspace model to the JPS build process in serialized way (IJPL-409)
If newly introduced 'jps.build.use.workspace.model' registry option is enabled, required modules and libraries are added to the JPS build classpath, paths to global and project cache file for the workspace model are passed to the build process, and it loads the project model from them instead of reading the project configuration files.

It's an experimental approach, and it isn't fully implemented yet:
 * it doesn't ensure that caches are up-to-date;
 * the cache currently cannot be loaded by the build process because it references entities and other classes aren't available in the build process (e.g. ScratchRootsEntity and VirtualFileUrlBridge).

GitOrigin-RevId: 54a4a49566ca9dd0433c7a13251c2e28fc051e78
2024-07-01 14:04:06 +00:00
Egor Ushakov
b103326863 IDEA-354542 Slow frame location resolve blocks the debugger
Rename methods

Fix debugger process await

Force stop debug process in tests

Do not create additional thread

fixing tests: wait for the debug process to stop

Test hotfix: await debugger thread complete

Introduce DebuggerCompletableFuture

fixing tests: do not rely that much on invokeRatherLater

fixing tests: command cancel may happen off debugger manager thread

added experimental annotations

Add DebuggerDispatcherTest

removed debugProcess param

reduce methods visibility

Call continuation in case of command cancellation

Fix test: call continuation in any case

Clean up

Unify invokeWithChecks

introduced onSuspend

Invoke resume in tests only after all commands complete

[debugger] IDEA-354542 Remove unused constructor parameter

Close test debugger manager thread on dispose

Close debugger manager thread in tests

Add extra check to the continuation set

Fix project leak in test, set up test disposable for DebuggerManagerThread

Launch single command once

Fix API test

Fix test: request source position from debugger manager thread

Clean up code

Clean up command scope creation

SuspendContextCommand logic should be skipped on coroutine resume

cancel coroutine scope in finally block

handle command cancellation

Rename .java to .kt

Fix read action

Start as completable future

Run with commands

Use coroutines in FileApplicabilityChecker

handle exceptions like before

Launch with dispatch

make internal

allow the dispatcher to work without a command in context

renamed debugger thread dispatcher

Add coroutines util functions

Wrap into readAction-s

Extract caching code in CompoundPositionManager

Small code clean up

minimize changes

IDEA-354542 Slow frame location resolve blocks the debugger - introduced PositionManagerAsync


Co-authored-by: Maksim Zuev <Maksim.Zuev@jetbrains.com>

Merge-request: IJ-MR-136324
Merged-by: Maksim Zuev <Maksim.Zuev@jetbrains.com>

GitOrigin-RevId: d78e8514b89afdde6bc710bb322d67ddea6449e8
2024-06-27 20:27:29 +00:00
Mikhail Pyltsin
092062f856 [java] IDEA-354964 Migrate standard descriptors like JAVA_21 to TYPE_USE annotations
- extract tests, which require old annotations
- return old name to method to add annotations

GitOrigin-RevId: c559cea10f942f72d5a19176d3ee808d46ad5dd2
2024-06-27 13:29:33 +00:00
Mikhail Pyltsin
36f87ac0b6 [java] IDEA-354964 Migrate standard descriptors like JAVA_21 to TYPE_USE annotations
- fix tests
- fixes to show external annotations

GitOrigin-RevId: 79cde38663de10c2985b72e76e98372fef214b20
2024-06-26 20:34:48 +00:00
Mikhail Pyltsin
638393e895 [java] IDEA-354964 Migrate standard descriptors like JAVA_21 to TYPE_USE annotations
GitOrigin-RevId: d13187d41d214bd2ccadecb4cadc925f7d787d60
2024-06-26 20:34:48 +00:00
Mikhail Pyltsin
2023228d8c [java-generation] IDEA-344399 generate annotation based on type_use option
- extracted new option
- reuse this option in MissortedModifiersInspection
- override uses this option too

GitOrigin-RevId: 39f3f72991240753c86c7f80df865728aa9743ad
2024-06-17 21:14:57 +00:00
Vladimir Krivosheev
a0b34c51a6 IJPL-796 fix memory leak - clear selected tab
GitOrigin-RevId: ca708e8b3acf2d6ebd638f81b4d89c062ade42c5
2024-06-15 19:18:50 +00:00
Vladimir Krivosheev
e5475bc39c move service.kt to core-api
GitOrigin-RevId: 496653a5afebb1d32ffccd8c7c3e9f6d1d3f60fd
2024-06-15 18:11:52 +00:00
Alon Albert
657db72255 Improve Debugger Tests ART Integration
Extract an interface that will allow Android Studio to inject a class that will handle ART VM debugger dependencies.

The interface is agnostic to ART. It should work for any remote VM.

GitOrigin-RevId: 78a210965ed2f61ebeb9de68dfc26d853b0312e5
2024-06-13 14:17:55 +00:00
Sergei Vorobyov
7fe8abacd6 IJPL-155979 [TestFramework] replaced usages of FileComparisonFailure and FileComparisonData by FileComparisonFailedError
GitOrigin-RevId: 6ea7df95ce2d230f3b90cd55e6069b9bf29e6d2b
2024-06-06 11:22:27 +00:00
Dmitry Avdeev
1ae7f9aacf [workspace] tree structure test
GitOrigin-RevId: bef4266b7031ba1718b1bb2eea149836c583ca58
2024-06-05 20:16:48 +00:00
Alexey Merkulov
9b8b6328e3 [debugger] Fix command managing in tests
GitOrigin-RevId: 82be73e436525cd1458b32d5fa1b9ce4d4dcd09a
2024-05-28 18:13:42 +00:00
Egor Ushakov
e91ae0c5c8 fixing flaky DebuggerSessionTest.testStateManager
avoid using UIUtil.invokeAndWaitIfNeeded as it logs InterruptedException inside

GitOrigin-RevId: af137d0b685270838f198e88da5347af0a1eee0b
2024-05-24 18:07:06 +00:00