Revert hiding public static field `INSTANCE` since a plugin uses it
(cherry picked from commit 44a0a3a066d923e0167489f443b511493a875daa)
IJ-CR-152896
GitOrigin-RevId: dea487b441d60680b93b246ee5ab1ab036e11d44
To avoid executing slow ops in getLogicalStructureBuilder()
on the EDT, split the implementation into the BGT and EDT parts.
The old function remains the same, but the new suspend
one executes the slow part in a regular readAction,
and the UI part on the EDT under the WIL.
(cherry picked from commit f772898db79b87079d03ee404ea8152359ec79e9)
IJ-CR-149552
GitOrigin-RevId: ef76166383c63919ffab3d7b14e30b8a5ee61a0d
Need to add some suspend stuff to it.
(cherry picked from commit 0a12edfddbe7cdc4c2254657155d4ae3cde2ea06)
IJ-CR-149552
GitOrigin-RevId: 33b50b8c12769c9072d02be869f3ca85a6fb6ca6
add default implementations to new CopyPasteManager methods
(cherry picked from commit 28f7098deb3700a9a7f711986466cb028d4785b3)
IJ-CR-147422
GitOrigin-RevId: 2555e6921edb7cfcf4c43b67772efb1bad87ec4a
Some components, like `IrbRubyLanguageConsoleView`, don't register custom actions right away in constructor. They may postpone it, for example, until when a component is first shown. The old code in `ActionConverterUtil` didn't handle such cases, leaving a component without actions, or only with some of them.
This commit supports listening for action changes and updating them during the lifetime of a component.
The main flaw still left untouched in this commit is `if (contextActions.isEmpty()) return control` line.
If, at the moment of a component conversion, there are no custom actions, they will not be listened to in the future as well. This is left for now because of two reasons:
1. It still fixes GTW-6744.
2. Otherwise, **every single component** would be wrapped into an action behavior wrapper, which is a very high penalty for such a small feature.
It is possible to introduce some markers in the future, to avoid the creation of wrapper for every component, still supporting some of them. But this can be done when it becomes actually needed.
(cherry picked from commit e48b64be70d6908efa798aaaec2ee00985069740)
IJ-CR-147506
GitOrigin-RevId: 90cb2b28a5dca84012b4c775de8d69251e5ce7da
Deprecated APIs which still have internal usage are marked as internal to ensure that new external usages won't appear.
GitOrigin-RevId: eedfd26c8fb330df53d94a8768821f7878974100
The new strategy no longer relies on the parent.
It works strictly top-to-bottom, looking inside child toolbars
for resizable components.
To make it work with the main toolbar, which isn't an ActionToolbar
itself, but a regular panel, its layout, HorizontalLayout, had to be
modified to accept an external function for calculating preferred sizes.
The new strategy first collects all resizable components, including
deeply nested ones, and then distributes the available size between them.
Then calculating the sizes of toolbars and their components becomes trivial.
GitOrigin-RevId: d11c47f010169b9175340ed9f0005822ddc4c346
No need to ++ by a single pixel on every iteration.
If there are other components left, we should at least increase
the component's width so it changes its position in the queue,
and we take another component on the next iteration.
Without exceeding its preferred width, of course.
If it's the last component, just extend it to its preferred size.
In both cases take care to not exceed the actually available
width.
GitOrigin-RevId: 73476a870e28873a761cdd6f38ee9b7881a4947d
A lot of refactorings squashed into a single commit,
as otherwise there would be way too many commits
for such simple changes, mostly extracting functions,
renaming/introducing/inlining variables.
No functional changes here.
GitOrigin-RevId: ef5b04adba30b1c72a8b0daaf64bb9b4783dcab7
Countless number of actions depend on this fact implicitly and do not take read action.
Lets document it.
GitOrigin-RevId: a6379cf3bdfb0c13793a872f9b41142d952d3643
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
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
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
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
1. No need to implement `CustomComponentAction` in an action
2. Support custom components for action wrappers
GitOrigin-RevId: eafd06b1f2c74f6f5b8fdfc3aa39525f3fea007c
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
All settings that are currently synchronized are registered in XML as `<projectSettings>` or `<applicationSettings>`. Also, all missing `noStateLoaded` methods are implemented.
GitOrigin-RevId: bd77035b4b9f1ecaa1f00c95723b27a1299c86ca