Files
openide/platform/editor-ui-api
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
..