Commit Graph

2000 Commits

Author SHA1 Message Date
Sergei Tachenov
be921b067e IJPL-158493 New tree model implementation
The main new interfaces are:

- TreeDomainModel - background model interface;
- TreeViewModel - flow-based view model;
- TreeSwingModel - Swing compatibility layer.

Auxiliary classes:

- SuspendingTreeVisitor - suspending TreeVisitor equivalent;
- LoadingNode - converted to Kotlin and retrofitted to implement
TreeViewModel.

New presentation rendering is implemented in NodeRenderer.

TreeUtil.getUserObject() adapted to unwrap
TreeNodeViewModel instances, as at this point they don't
extend DefaultMutableTreeNode. It just doesn't seem necessary,
as Swing models technically don't require it.

In a similar fashion, CachedTreePresentation.getCachedNode
adapted to unwrap nodes as necessary, as the new implementation
forces nodes to be TreeNodeViewModel instances.

AbstractTreeNodeVisitor modified to call TreeUtil.getLastUserObject
instead of trying to unwrap the node itself. This lets us reuse
the new getLastUserObject implementation without duplicating logic.

The new implementation isn't used anywhere yet, so this commit
alone shouldn't affect anything.

GitOrigin-RevId: 8427b6642ff1902b3b71104c3611388e1270a5e4
2024-09-13 17:27:32 +00:00
Sergei Tachenov
1f3bbf9580 IJPL-158493 Reduce dependency on AsyncTreeModel
Before migrating the Project View to the new models,
we need to take care of existing code that relies on the exact
implementation class.

For "Can this thing calculate nodes on a BGT?" instanceof checks,
introduce a new marker interface, BgtAwareTreeModel.
We may add methods such as isProcessing() there later.
Replace existing usages with the new interface.

For "Can this thing accept a visitor on a BGT?" instanceof checks,
introduce TreeVisitor.LoadingAwareAcceptor with the second
accept() overload that controls node loading. Replace existing
usages.

GitOrigin-RevId: 67905cc6873aab2f917ee2028d0a167f60fa85f7
2024-09-13 17:27:32 +00:00
Aleksey Pivovarov
21669bd9b2 IJPL-72931 vcs: enable 'Blame' for preview toolwindows in "Find Usages" and "Find in Path"
GitOrigin-RevId: 9561f20b13c05a3745e6c54a32fa42ea32f4ded7
2024-09-13 16:22:15 +00:00
Vadim Salavatov
99a2fde9ae IJPL-161819 AI: provide a way to write a prompt in natural language right in the editor
Brought to you by: Vadim Salavatov, Dmitrii Batkóvich, Aleksandr Trushev, Yuriy Artamonov, Maksim Medvedev, Konstantin Nisht, Anna Saklakova, Yulia Zozulya

Squashed commits (original commits may be found in vadim.salavatov/nl-query-detect-backup branch):

rename things to Inline Prompt

remove println

rename module and package to intellij.ml.llm.inlinePromptDetector

Clear inlay hint in more cases

rename advanced setting

fix bug: code gen could've been invoked several times concurrently on several clicks on tab

use user data instead of a custom registry to track running code generation

rename methods

rename class

rename classes

rename survey classes

rename bundle

fix broken Alt+Enter inside prompt

cleanup

Clear inlay hint when generation is over

fix broken bulb

Don't start completion inside inline prompt, more powerful fix

disable inline completion when NLP markup is here

Don't start completion inside inline prompt

Fix blinking inlay hint

add dependency intellij.platform.lang.impl

magic wand caret fixes

Don't suggest auto-import action for highlight infos that are disabled in the editor

split tokens only by space

add kill switch for inline code generation

add private

cancel code gen on ESC

add more prompt instantiators

support disabling highlighting for prompt

Allow editor to have several highlighting predicates

Previously, one predicate was enough because it was used only for switching highlighting level (none/syntax/essential/all problems). Now, in addition to it, we need a way to filter our highlighters from different resolve contexts.
Thus, HighlighterFilter class is added which handles several predicates nicely.

Fix feedback ticket title

nlp input feedback dialog

remove NLP modules from IU ultimate

add activity for code generation, so that it is counted in LLM statistics

Show inlay hint with tab completion

add more words but not verbs

add language to usage events

fix theming

add more verbs

inline prompt first implementation

drop unused properties file

merge kotlin and java modules of nldetect into main module for now

remove llm and nldetect from bundled plugins

remove nldetect plugin, add dependency on its modules from llm

disable inline prompt by pressing Esc

don't resolve all leaves in a file

resolve only leaves on caret line

Revert "don't resolve all leaves in a file"

This reverts commit 1e36c778db2693090e1498b7063b6ece2005ab1c.

don't collect all children to check if it's a leaf

add java support

add dependencies

do not enable feature if ai disabled for project

add 'refactor' to prompt initiators

add more words

use as top priority action

fix typo

do not highlight more than one line

magic wand v2

use not null types

add advanced setting (idk but it doesnt work when one tries disable it, help pls)

add a proper icon for intention

extract prompt highlighting text attrs

i18n

add bundle

Natural language prompt detection prototype

refactor prototype

move kotlin highlighting into a dedicated module

rename module

introduce layer override in HighlightInfo (internal API) in favor of InternalHighlightingLayerSupplier

drop dead code

highlighting pass instead of an inspection

a bunch of very cursed hacks for the demo

make code generation inspection high priority

detect more verbs

fix in editor generation

another smth smth together with Dima Batkovich

something something

adjust position

magic wand caret

GitOrigin-RevId: a662396e479029cf89bc8a4e5a8f0d8725cbb63f
2024-09-07 04:42:12 +00:00
Vera Petrenkova
1157abcc54 Revert "IJPL-161649 Refactor CompressingLayoutStrategy calculation logic"
This reverts commit 5b4b8bbe93496878fed7771b19752edebc32b225.

GitOrigin-RevId: 2825b90a5c0fd1509c2611a1c23db21966069f8d
2024-09-06 12:06:09 +00:00
Vera Petrenkova
682c9e76d3 IJPL-161649 Refactor CompressingLayoutStrategy calculation logic
The previous implementation didn't expect that a parent component is also ActionToolbar and could contain some other components except the ActionToolbars

GitOrigin-RevId: 5b4b8bbe93496878fed7771b19752edebc32b225
2024-09-04 17:29:29 +00:00
Gregory.Shrago
26f87a9fc6 introduce ActionUtil.COMPONENT_PROVIDER
1. No need to implement `CustomComponentAction` in an action
2. Support custom components for action wrappers

GitOrigin-RevId: eafd06b1f2c74f6f5b8fdfc3aa39525f3fea007c
2024-08-31 02:55:51 +00:00
Gregory.Shrago
a7dc5858f4 exclude search popups in isFromContextMenu
Fixes missing `FindInPathAction` in Find Action.

GitOrigin-RevId: 27b6d6ef8ed7fa9e00983ec22e3ebca5b42cfa76
2024-08-30 18:50:13 +00:00
Gregory.Shrago
8a8f1c7862 drop BackgroundableDataProvider
GitOrigin-RevId: 97284b0ae7f0d090cb6e1656a23fdd9261202fee
2024-08-29 16:39:53 +00:00
Gregory.Shrago
e6ee0c21e8 deprecate ActionPlace.isXXXPlace methods
Since we now have `event.uiKind`, `event.place` must not be used to alter UI behavior. The `place` is only for stats, logging and debugging.

Also, drop some unused methods.

GitOrigin-RevId: c996d5a446ac7688f1051604f7350bc81411d768
2024-08-28 05:13:52 +00:00
Vyacheslav Moklev
bd73a88a00 [RDCT] GTW-9421: Declare currently synchronized setting in XML and fix load methods
All settings that are currently synchronized are registered in XML as `<projectSettings>` or `<applicationSettings>`. Also, all missing `noStateLoaded` methods are implemented.

GitOrigin-RevId: bd77035b4b9f1ecaa1f00c95723b27a1299c86ca
2024-08-26 17:14:38 +00:00
Gregory.Shrago
6a99775dae introduce ActionUiKind.SEARCH_POPUP
Any action search popup - SE, Find Action, any local action search.

GitOrigin-RevId: 68c89a3d302ef72e7a9393bb7683ab1f7f14da76
2024-08-26 16:49:35 +00:00
Dmitry Avdeev
9a85897633 typos
GitOrigin-RevId: 3debbde05a4ccf4ce87d0906ddbdc8dbe8040e63
2024-08-26 16:07:23 +00:00
Yuriy Artamonov
90f2e26354 [ui] IJPL-160993 Editor: Set default tab limit to 30
GitOrigin-RevId: d1992220370246baa948b946ee917324c007a6ee
2024-08-26 12:46:42 +00:00
Gregory.Shrago
479b72a2d2 deprecate AnActionEvent without uiKind
GitOrigin-RevId: e86a825a8cd2344f50c3f44bc07ec03e2e328581
2024-08-23 09:56:07 +00:00
Gregory.Shrago
03461c332d deprecate ActionPlaces.isPopupPlace
GitOrigin-RevId: bb03298be7085af8c377bd0c17dc0a577d43b2f4
2024-08-23 09:56:07 +00:00
Gregory.Shrago
6ce584c023 make AnActionEvent methods final
GitOrigin-RevId: 6aa1f7ff172307ac0e504b180daff48b72938fa1
2024-08-23 09:56:07 +00:00
Gregory.Shrago
b592eca4fd introduce ActionUiKind
Finally, there is now an easy way to detect whether an action is updated for a horizontal or a vertical toolbar. For the main menu, a context menu, or a popup.

GitOrigin-RevId: 046be7bd74501ddd46e04e46bec758dbc184e3d8
2024-08-22 17:24:58 +00:00
Gregory.Shrago
9da17ad473 change postProcessVisibleChildren return type to wildcard
GitOrigin-RevId: cb59a2ee0e0ec249a96d4645b4839a89c67352c0
2024-08-21 16:42:06 +00:00
Yuriy Artamonov
716b98a25e [searcheverywhere] IJPL-159528 Store preview enabled state in UISettings
Fix migration and force saving of new state

GitOrigin-RevId: 61d01c14e8661a194abc4f552cb3a596064b4c5f
2024-08-19 17:35:09 +00:00
Yuriy Artamonov
15c6c99aa1 [searcheverywhere] IJPL-159528 Store preview enabled state in UISettings
GitOrigin-RevId: 9777236ce8673bd79559a192ad4df5758e2cdae8
2024-08-16 10:07:40 +00:00
Gregory.Shrago
3b8fd2ade8 introduce ActionUtil.SHOW_TEXT_IN_TOOLBAR
To reduce the number of `AnAction` methods, to simplify RemDev.

GitOrigin-RevId: 845885a71d723c8275f0e59b9ce091fb308cae1a
2024-08-15 08:03:57 +00:00
Alexey Kudravtsev
1a6a0ee627 cleanup
GitOrigin-RevId: 740ad47daa4cc012c9c79960f8726a5aa8db2b07
2024-08-13 15:05:28 +00:00
Sviatoslav Vlasov
37562bfadb [rdct][lux] Turn off animated scrolling for remote development mode.
Animated scrolling performs very badly in remdev mode (lux)

GitOrigin-RevId: 822a65e1ce421357382e22150d8b7d815b71a0a5
2024-08-13 12:50:07 +00:00
Vladimir Krivosheev
4db906a36c ignore AlreadyDisposedException
GitOrigin-RevId: 68a8750491ccc980094126533df7a33d662f0057
2024-08-12 20:19:39 +00:00
Gregory.Shrago
342245ef74 migrate TreeStructureProvider to uiDataSnapshot
GitOrigin-RevId: 250632e2302977608c45a84079191519fa024b6d
2024-08-12 15:00:58 +00:00
Gregory.Shrago
2e7742737b drop deprecated ActionUpdateThread.OLD_EDT
GitOrigin-RevId: 2ef91367634caf5e3a35d3d1ad9a7b76d44fc5af
2024-08-11 23:29:30 +00:00
Gregory.Shrago
df83928ef0 migrate CustomizedDataContext.create usages
GitOrigin-RevId: b58edb35801b2a9d2212bddfc84209d8ceb4a275
2024-08-08 18:46:07 +00:00
Gregory.Shrago
1b1158f4d1 introduce UiDataProvider.wrapComponent
GitOrigin-RevId: c73b024b030a002743837e8ebfdfa296d40b25d4
2024-08-07 21:37:27 +00:00
Gregory.Shrago
6f93c08004 support editor markup model toolbar in RemDev 2
Introduces `ActionWithMergeId` to avoid duplication in UI for dynamic actions and groups present both on client and on host.

Fixes
GTW-9435 Inspections widget is doubled

GitOrigin-RevId: e7ae0def06cad3b0df6d733bfd3cccc357622673
2024-08-07 16:46:49 +00:00
Nikita.Lyubimov
fac4abfb00 [RIDER] Cleanup getActionBehavior and inline unnecessary method in RiderActionUpdateInterceptor
(cherry picked from commit 5979125a4d8bfb38c98e330f88a1d8e0f846e2be)

IJ-CR-141750

GitOrigin-RevId: 62a28afedc72e8a82d9781a64803b44f836a5b55
2024-08-06 15:37:44 +00:00
Nikita.Lyubimov
f0ba581596 [RIDER] Changed ActionRemoteBehavior overrides in Rider and CLion. Added REMOTE_UPDATE_KEY which can specify that the action requires a backend update, despite its ActionRemoteBehavior. Fixed frontend actions updating on backend in Rider and Clion (RIDER-115497)
(cherry picked from commit a487db0b1c94692fe6f7eb2b5eff51ccc11a25b4)

IJ-CR-141750

GitOrigin-RevId: f58d8d83e4e1d034d4c75e5d456e051096022248
2024-08-06 15:37:44 +00:00
Yuriy Artamonov
89af9169b4 [searcheverywhere] IJPL-159528 Store preview enabled state in UISettings
GitOrigin-RevId: b4295874fb0d7986ab7a43af12959bfd87b9a30d
2024-08-02 11:26:55 +00:00
Gregory.Shrago
7cad79a9ca migrate getData to uiDataSnapshot: platform
GitOrigin-RevId: d61a393ffadb50ccadae880d30a75d362b2e2258
2024-08-02 01:17:08 +00:00
Vladimir Krivosheev
af6959e243 IJPL-158410 make sure that we disable ugly ancient outdated swing implementation of tooltip
GitOrigin-RevId: ec8be5047832dbafa16dde8d8908d1656a5cce15
2024-07-16 16:57:35 +00:00
Gregory.Shrago
4debbfe446 drop deprecated postProcessVisibleChildren overload
GitOrigin-RevId: 7334a507aac3ce4cc03e47fe051c279407fecc54
2024-07-09 21:36:33 +00:00
Gregory.Shrago
dc75b92839 introduce postProcessVisibleChildren(event, actions)
Event holds some data that can be important for the post-processing like actionManager, place.

GitOrigin-RevId: 2f2d6ee01c8420d9f41d239d4b0115a27511aa67
2024-07-09 21:36:33 +00:00
Ivan.Yarkov
265244387a RIDER-114327 use short name in navbar presentation for members
(cherry picked from commit 7fbf9411032eac97da719a7a3ac943ff291af06b)

IJ-MR-139203

GitOrigin-RevId: c408ca4652e2b1bab98dc852772637760640a58b
2024-07-09 02:46:10 +00:00
Daniil Ovchinnikov
7e3390a939 IJPL-150347 treat @NonExtendable classes as effectively final
GitOrigin-RevId: 273fb2a330cb67183be538890ae5c2c53aa9acf8
2024-07-08 23:18:28 +00:00
Max Medvedev
701063da16 more honest doc comment for RangeHighlighter#getErrorStripeTooltip
GitOrigin-RevId: 50df47ca79be893befca33f2530b54f98b926b63
2024-07-03 21:32:53 +00:00
Gregory.Shrago
c8918f2286 introduce KeepPopupOnPerform: drop old multi-choice methods
See
IJPL-157628 Introduce Keep popups open for toggle items setting

GitOrigin-RevId: c61ca430c3531c862212d215e764b8ce7979213a
2024-07-03 04:11:57 +00:00
Gregory.Shrago
98e7545cb8 introduce KeepPopupOnPerform to replace Presentation.isMultiChoice
A 4-value enum now includes previous "hard" and "soft" semantics without special treatment for `ToggleAction`.

See
IJPL-157628 Introduce Keep popups open for toggle items setting

GitOrigin-RevId: 123935b9367dd624b4c810b0dfa066fba23e1672
2024-07-03 04:11:57 +00:00
Gregory.Shrago
b22f8c4958 IJPL-157628 Introduce Keep popups open for toggle items setting
GitOrigin-RevId: 07215776d8dfd7ecf5381b2b04016fc0d810a734
2024-07-01 18:52:42 +00:00
Nikita.Lyubimov
c126c17b1c [RDCT] Clenup ActionRemoteBehaviorSpecification and get rid of getBehavior overloads
GitOrigin-RevId: bc66736330d6a266461ecfd36f73fc5dd2045c39
2024-06-25 00:06:56 +00:00
Bas Leijdekkers
fca958ee2a Use "Highlight usages of element at caret" color instead (IJPL-45173)
removes separate color settings for "Selected text highlighting"
disables highlighting of usages of element at caret when a selection is present

GitOrigin-RevId: f5009f7ac8508a02cf5e2aa16aee3d891d24fad5
2024-06-24 13:46:58 +00:00
Gregory.Shrago
6a1966c600 introduce Presentation.enabledInModalContext property
Moves `AnAction.myEnabledInModalContext` property to `Presentation`.

GitOrigin-RevId: 03935a158015a50256f4438bcbfa0e8350fce0de
2024-06-23 21:56:44 +00:00
Gregory.Shrago
b6816ded5e deprecate beforeActionPerformedUpdate
The method has not been used since 241.
Also, tweak some javadocs.

GitOrigin-RevId: 426f412929542712c8455806d42fef56a837d860
2024-06-23 21:56:44 +00:00
Gregory.Shrago
51efd9e1b6 rename EdtDataProvider to UiDataProvider
`EdtDataRule` becomes `UiDataRule`. As previously, the name now reflects the data it operates on. It makes the fact rules are called in EDT and BGT less confusing

GitOrigin-RevId: 68f0f3451053ff387f90394872606434852aa32b
2024-06-22 20:48:01 +00:00
Vladimir Krivosheev
2044ac86a3 IJPL-157060 refactor PsiFileNode
GitOrigin-RevId: 023a3727cabb8f59eeb600b97e24f6ed1f9e7f34
2024-06-22 08:40:54 +00:00
Vladimir Krivosheev
00abd9d631 IJPL-796 mark project as Nullable
GitOrigin-RevId: 9213b0bf9c43ec302cc6c487e0621b952d91c8e8
2024-06-21 06:27:32 +00:00