Commit Graph
438402 Commits
Author SHA1 Message Date
Anna Kozlova 6e52013a66 [kotlin] k2: extract function refactoring
Refactoring is done in phases:
I. Parameters
  1. all references in the selected fragment are resolved and marked
  2. temp anonymous function is created and the selected fragment is pasted there
  3. all references in temp fragment is resolved, and for each reference which resolves differently a parameter is created
  4. parameter's type is calculated based on the type of the initial expression, the minimal applicable type is to be calculated (KTIJ-29166)
  5. parameter types are checked if they are visible from the new target and iff not, a conflict message is shown
II. Return type
  1. Jumps & returns are analyzed to check if extraction is possible. Conflict is shown e.g., if jumps point to the different targets or jumps and returns coexist.
  2. Return type is detected by the type of return statement, last selected statement or jump statement
  3. Return type is checked if it's visible and iff not, a conflict message is shown
III. Generation
  1. Signature is build based on defined parameters and return type; set of names is generated based on return type
  2. Body is created from selected fragment with replacements for jumps/returns
IV. Duplicates are processed
  1. Not implemented yet (KTIJ-29165)

^KTIJ-26164 fixed

GitOrigin-RevId: 1398693c73b2c7d5c7fe08712de0bb8777fa1810
2024-03-27 19:29:45 +00:00
Nikolay Chashnikov 49298bfdaf [build scripts] ensure that scrambled modules in the platform aren't included in the classpath of the frontend process (GTW-8241)
The embedded frontend process's classpath includes plugins/cwm-plugin/lib/client/cwm-guest.jar, which contains scrambled classes of the module 'intellij.platform.commercial.license' and its libraries. Before, these modules were also included in lib/product-client.jar in the platform and scrambled (differently) there. This causes problems if different classes are renamed to the same name in these JARs during scrambling. Now these modules are excluded from lib/product-client.jar, and the runtime module repository maps them to cwm-guest.jar.

GitOrigin-RevId: a6f4503954831d250c2460a63cda20f2e8419a4d
2024-03-27 19:29:14 +00:00
Daniil Ovchinnikov 81ec05aefa IJPL-850 extract intellij.platform.navbar.compatibility.backend module (2/2)
GitOrigin-RevId: a98a521db78189f60906d5c6dc563f8b956c1e49
2024-03-27 19:28:20 +00:00
Daniil Ovchinnikov c5684a12a8 IJPL-850 extract intellij.platform.navbar.compatibility.backend module (1/2)
GitOrigin-RevId: 40b663b35454d78896861d950ab4bbcad956a8a4
2024-03-27 19:28:15 +00:00
Toshiaki Kameyama 8e4fd91fb3 [kotlin] Delegating to 'var' property: don't report if property is used
^KTIJ-24692 Fixed

close #2725

GitOrigin-RevId: 46a4c32d2a4943a069278307d6e875274994d2e4
2024-03-27 19:21:35 +00:00
Petr Surkov 54c7c2c0cb [full-line] ML-2900 Bump completion group version
GitOrigin-RevId: e2296699ae1f3e89d2380b392dea51c1433dba99
2024-03-27 19:18:45 +00:00
Petr Surkov 382f7cbf72 [full-line] ML-2900 Remove deprecated InlineContextFeatures.kt in favor of ML API
GitOrigin-RevId: 0f548a2af76335a524419d4e28084b7f66e0deba
2024-03-27 19:18:45 +00:00
Petr Surkov df81c6f946 [full-line] ML-2900 Bump inline.completion group version
GitOrigin-RevId: da23e3abf0e42f20285d76b68c28785ca9a11cf9
2024-03-27 19:18:45 +00:00
Edem Ibraimov 14fb4c75fa lang: replace debug with trace logs
GitOrigin-RevId: 38959a8a30b4d64d03afbadc5311208cbbc30f15
2024-03-27 19:16:39 +00:00
Anna.Gromova 7d1010cafb RIDER-107178 Report to stats events about the new inspection widget
GitOrigin-RevId: b59f9d1edf6c1964cdcde7c7f9100802eed5672e
2024-03-27 19:00:04 +00:00
Edem Ibraimov b796da9fa9 DynamicBundle: log "no bundles found" message once per getBundlesFromLocalizationFolder
GitOrigin-RevId: b11f2660d8e1566c6a584ee4de7de6789744ef8a
2024-03-27 18:09:22 +00:00
Alexey Utkin 7b00d65430 CPP-38168 Add FUS for 'Semantic highlighting' usages
GitOrigin-RevId: 7e284a7687dd235848307cf60e7aace4d7cabd29
2024-03-27 18:08:30 +00:00
Pavel Kirpichenkov a8bf8a4094 [Kotlin] Remove Kotlin SDK in the tear down of light fixture tests
Light descriptors for Kotlin JS projects now set up module's platform correctly.
This triggers Kotlin startup activity to create a Kotlin SDK.
This SDK should be removed after the tests to prevent leaks.

KT-65892

GitOrigin-RevId: 7fae6062ac1bc10f62f27bf9acb8dc43038e6eb8
2024-03-27 18:04:21 +00:00
Pavel Kirpichenkov 8e872e6f08 [Kotlin] Add completion tests with legacy kotlin-stdlib-js
Completion tests with a kotlin-stdlib-js with both .knm and .kjsm files.
The tests are necessary to confirm the correct handling of legacy libraries by K2 IDE.

Additionally, set up the target platform of test JS modules properly.
In K2, it's important as resolution scope is filtered based on platforms.
See IdeKotlinByModulesResolutionScopeProvider.excludeIgnoredModulesByKotlinProjectModel.

KTIJ-27566
KT-65892

GitOrigin-RevId: aa9678567e241260ef19e5f03d5dfd9b64c13fdb
2024-03-27 18:04:21 +00:00
Pavel Kirpichenkov 013a607fc9 [Kotlin] Add completion test
KT-65892

GitOrigin-RevId: 72abcffe0ab1c1e91bc2674be1c5f9ba0a44802f
2024-03-27 18:04:21 +00:00
Pavel Kirpichenkov fc68ad3dec [Kotlin] Tests: introduce K2 JS completion test and move JVM-dependent data
KTIJ-27566
KT-65892

GitOrigin-RevId: 3400e0cb51a61cd205555cc19baddd487ec64f20
2024-03-27 18:04:21 +00:00
Pavel Kirpichenkov a48d24f0ce [Kotlin] Disable legacy Kotlin JS decompiler in K2
.kjsm files can be present in libraries, but should be ignored
in K2 IDE mode: with KGP 1.9.0+ they are not used for compilation.
Removing decompiler from K2 is the easiest way to avoid errors caused
by duplicated declarations.

KTIJ-27566
KT-65892

GitOrigin-RevId: 8feeb9059466d27bff5bbf85bb35ca339ec409ca
2024-03-27 18:04:21 +00:00
Sergei Tachenov f024e0a5d4 IDEA-317864 Add ScrollableContentBorder to InspectionResultsView
GitOrigin-RevId: b306e0ff1e5d31cd8e2f7b6c1295c84116c8fffb
2024-03-27 18:01:59 +00:00
Sergei Tachenov 8cb2ff6045 IDEA-317864 Use ScrollableContentBorder in ProblemsViewPanel
To account for orientation changes, extract the code setting
the toolbar border into a function and do everything there.
It's called from the contstructor and when the orientation changes.

For the old UI it does nothing, so nothing is updated. It's the existing
behavior, so we leave it alone, even though it looks wrong, but that's
a separate issue.

GitOrigin-RevId: 7df540d66fb2d46b3b8cf880335a74fca021b089
2024-03-27 18:01:53 +00:00
Sergei Tachenov 94896c2c3b IDEA-317864 Use ScrollableContentBorder for Notifications
GitOrigin-RevId: 6174a8aee7c8dbe168f2c478e4e1a5aa436ae631
2024-03-27 18:01:48 +00:00
Sergei Tachenov e37ebbc468 IDEA-317864 Use ScrollableContentBorder in Services
GitOrigin-RevId: 3b36001bcdfc4f7726d5150ff418f82824b2b4fb
2024-03-27 18:01:43 +00:00
Sergei Tachenov 6c5148f079 IDEA-317864 Use scrollable content border in the Commit tool window
GitOrigin-RevId: 44a0eadc2f1622084bb2f5938bacf390f8cd8bb4
2024-03-27 18:01:37 +00:00
Sergei Tachenov a018819d3a IDEA-317864 Use the new scroll pane tracker for toolbars and headers
Specifically, in SimpleToolWindowPanel and ToolWindowImpl for
painting the border and the tool window header.

To avoid double borders with ScrollableContentBorder, introduce
client properties that indicate that there's already a border nearby,
so there's no need to paint another one.

Because ScrollableContentBorder can be installed on a different
component than the scroll pane itself, also introduce a weak reference
property to indicate which target component the border is installed
on, so that all checks work properly even if the scroll pane is located
elsewhere.

GitOrigin-RevId: 602998a9346ce2503e56bc9823fb53bc6af8c248
2024-03-27 18:01:32 +00:00
Sergei Tachenov 322e2e9db2 IDEA-317864 Refactor ScrollableContentBorder to use the new tracker
GitOrigin-RevId: c3450a51b07c4789d1ed9b2e110dfc4682b93b83
2024-03-27 18:01:26 +00:00
Sergei Tachenov a166321635 IDEA-317864 Create a class to track scroll pane states
To sort out this mess with borders and scrollable content,
we need a tool to keep track of scroll panes and their
scrolled state.

These two classes are designed just for that: one keeps
track of all scroll panes in a given container, the other
is responsible for tracking a given scroll pane and can
be used separately.

GitOrigin-RevId: f3c0c0289612457f2ffb9488ba7715a7c5b35e7f
2024-03-27 18:01:21 +00:00
Sergei Tachenov 449ba20e95 IDEA-317864 Clean up SimpleToolWindowPanel
Remove an unused field, replace size() == 0 with isEmpty().

GitOrigin-RevId: 972828775ac31e7243fab46409c4eee71a443886
2024-03-27 18:01:15 +00:00
Sergei Tachenov 9a0ab4d75c IDEA-317864 Drop problems view toolbar border
It'll be replaced by a universal solution.

GitOrigin-RevId: d2d7d956484aab7e745dbe980dc0fe426527955a
2024-03-27 18:01:10 +00:00
Sergei Tachenov 508585f9a4 IDEA-317864 Drop notifications border
It'll be replaced by a universal solution.

GitOrigin-RevId: 496018d5c16ea503353c3f440523415df1a8a838
2024-03-27 18:01:04 +00:00
Sergei Tachenov d18ca94412 IJPL-928 Mark EditorImpl.RepaintCursorCommand as context-aware
Scheduling a runnable using scheduleWithFixedDelay wraps
it into a ContextRunnable under the hood, which captures the context,
which sometimes contains a reference to the project, creating a leak,
because it's a global app-wide thing.

Since this thing is pure UI code and doesn't require any context,
we mark it as context-aware to avoid capturing the context.

GitOrigin-RevId: 23240d901b6bae541b103563399a8030d5e4f1d6
2024-03-27 18:01:00 +00:00
Sergey Karpov 362a8689ab Added XDebuggerUtil interface for toggling breakpoints. Added PyCharm remote driver tests.
PyCharm tests include debugger tests and project creation tests (migrated from old UI tests), AI Assistant chat tests.

GitOrigin-RevId: bf435e56d8eaa7f71d41a30a90f1a2de3a55f95e
2024-03-27 17:53:03 +00:00
Elena Shaverdova e84af2d93f Add description for FUS-4321
GitOrigin-RevId: b1aadb1f5a5ef9da6beb0d77754e0e668fc44d88
2024-03-27 17:24:22 +00:00
Daniil Ovchinnikov 75a6e12544 rename com.intellij.openapi.progress.checkCancelled -> checkCanceled
GitOrigin-RevId: 4d7fbf39376de5c6187dba272249de67bb8e97e7
2024-03-27 17:18:32 +00:00
Daniil Ovchinnikov 5116d6ec4b IJPL-797 exclude XML plugin-dependent classes from the platform API
GitOrigin-RevId: c98a4a022c4237bed3a885c0f7d493878fc802f2
2024-03-27 17:18:27 +00:00
Konstantin Hudyakov 90407123a7 IDEA-349803 Fix NPE and compatibility with remote dev
The toolbar actions getter is used in the remote dev.

GitOrigin-RevId: 76139dd7767860b4fe3ccc5b3c17c48ce17cfca2
2024-03-27 17:15:04 +00:00
Sergey Prigogin 7337a36bd9 IDEA-349803 Eliminate the gap before the tab actions' icons
The gap was caused by ToolWindowContentUi.TabPanel pushing the tab actions toolbar (ToolWindowHeader.toolbarWest) to the far right when the preferred width of TabPanel was larger than the sum of widths of its visible children. Since reducing the preferred width would prevent TabPanel from growing when its container becomes wider, the tab actions toolbar has been moved inside ToolWindowContentUi.TabPanel instead, This way the tab actions toolbar can be positioned adjacent to the rightmost visible tab regardless of the TabPanel's preferred width.

Code related to the tab actions toolbar has been moved from ToolWindowHeader to ToolWindowContentUi.

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

GitOrigin-RevId: c653d274efe723066325cac51e8ef48ccc87bad8
2024-03-27 17:14:59 +00:00
Konstantin Hudyakov 761e92518c [tabs] IDEA-300571 Update tab toolbars only when tabs are not hidden and there are some tabs
GitOrigin-RevId: acae17af08afcd4eb114626ec256b51d7bb8544a
2024-03-27 17:14:54 +00:00
Petr Kudriavtsev 3fd4de3809 [clion] fixed CPP-38152/Project-leak-in-CLion-Trunk-General-Tests-on-Win-11
LeakHunter should trigger erasing of expired elements from WeakHashMaps
before checking them to avoid false positives.

https://jetbrains.team/p/ij/reviews/130067/files

GitOrigin-RevId: abda6fb6bc88ba3f104d25bddf9fc18405c9a4d8
2024-03-27 17:12:20 +00:00
Ivan Pashchenko 0249876623 IJPL-442: add tests for CEF vmoptions
GitOrigin-RevId: 27e3304c08bb8e7517096c0157bec957f1f07f59
2024-03-27 16:40:06 +00:00
Ivan Pashchenko 02a11ebaf8 IJPL-442: refactor cef sandbox to not be mentioned in java.rs
IJ-CR-129069 feedback

GitOrigin-RevId: 0b59c9fbfcafcc6f1b14be5999345060d97db33c
2024-03-27 16:40:06 +00:00
Ivan Pashchenko 4296c8c433 IJPL-442: be consistent with .gitignore and don't store any .idea stuff in Git
IJ-CR-129069 feedback

GitOrigin-RevId: 91a3776b0ad649f69a7c9ab857e47e5bbf4daead
2024-03-27 16:40:06 +00:00
Ivan Pashchenko 41cac5a331 IJPL-442: remove tar/bzip2 dependency
IJ-CR-129069 feedback

GitOrigin-RevId: 2b7c86d48017c70dc6e4e43ad2a7a8d55c6aadac
2024-03-27 16:40:06 +00:00
Ruslan Cheremin d24874fa76 [vfs] IDEA-350058: system property to control VFS protection from concurrent access by another process
- By default: VFS fails IDE startup if detects that it's storage is currently in use by another (alive) process
-`-Dvfs.fail-if-used-by-another-process=false` to disable that -- error will be logged instead

GitOrigin-RevId: 6d6707a5add2113680adc989fe14522894300d83
2024-03-27 16:33:40 +00:00
Ruslan Cheremin 5dac7d1b00 [vfs] improve error message on failed file cleanup
GitOrigin-RevId: fe576f680c6ebbcaf6cd7fd61f60820bb2c4a414
2024-03-27 16:33:40 +00:00
Ruslan Cheremin 823a110625 [vfs][cleanup] remove 'final' from params/locals
GitOrigin-RevId: de92aacaa939069f4f22bf49a4b27d3cc6df6562
2024-03-27 16:33:40 +00:00
Ruslan Cheremin 6707e4accd [vfs][refactoring] replace .dirty with global .modCount in PersistentFSRecordsLockFreeOverMMappedFile
GitOrigin-RevId: cd3d2b4dd343c0aac46a35bb8f9dc4d3778ed919
2024-03-27 16:33:40 +00:00
Ruslan Cheremin 8bcc1e55cc [vfs] IDEA-350058: fail IDE startup if VFS storage is in use by another process
GitOrigin-RevId: 08cb4d57ff9262ddda9f80133bc62f87ec27c260
2024-03-27 16:33:40 +00:00
Ruslan Cheremin 40a127b1f0 [vfs][refactoring] renamed PersistentInMemoryFSRecordsStorage => PersistentFSRecordsOverInMemoryStorage
GitOrigin-RevId: e979826cc0bdb6d91fff4ee4a56a6b47e7593ac8
2024-03-27 16:33:40 +00:00
Ruslan Cheremin 5dcdd50883 [vfs] IDEA-350058: protect PersistentFSRecords from concurrent access by another process
+ There are EA reports that could be explained by VFS storages being opened and used from >1 process. We have a protection from >1 IDE instance running -- but the protection is not 100% reliable, there are examples of >1 IDE instances running => VFS need it's own protection mechanism

GitOrigin-RevId: a784627cc5db470c09f69285b92c6bfc87ac36d0
2024-03-27 16:33:40 +00:00
Scott Pollom d4e759aa3f [gradle] Mark buildSrc modules for Gradle 8.0+
After 1fa206f, GradleModuleData.isBuildSrcModule() would incorrectly
return false for buildSrc modules when using Gradle 8.0 and higher.

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

GitOrigin-RevId: 9d32bca27070fccbf3f4cc89c73925052ffde3b8
2024-03-27 16:26:49 +00:00
Scott Pollom 1a87afe3b4 [gradle] Mark buildSrc modules for Gradle 8.0+
After 1fa206f, GradleModuleData.isBuildSrcModule() would incorrectly
return false for buildSrc modules when using Gradle 8.0 and higher.

GitOrigin-RevId: 269c66d67ff8b1f5617291ad832d169f38bbfb57
2024-03-27 16:26:49 +00:00