To use cached presentations saved/restored by TreeState,
we implement the new CachedTreePresentationSupport
interface in both Tree and AsyncTreeModel. The tree part
handles expand/collapse logic, the model part handles
the tree structure itself.
To keep cached nodes expanded as the mode loads real nodes,
we listen to tree structure change / node insertion events
and re-expand nodes accordingly. Failure to do so would lead
to nodes collapsing as soon as their real counterparts are loaded.
However, if a node is explicitly collapsed, for example,
because the user clicked it, we remember that and don't
re-expand these nodes again as they're re-added as children
of nodes being loaded.
GitOrigin-RevId: 11c85e5f38c9a9f63ce499328e2d408c53b77ff1
To fix the Project View jumping up and down when
its state is loaded, we need to persist its presentation data,
as there's no way to load it quickly enough. Implement it
by adding new createOn() overloads to TreeState that
persist these presentations in addition to the expanded
and/or selected paths.
Because the state is restored incrementally, loading
nodes, then loading their children, and so on, we need
some way to merge cached presentations with those
that have been already loaded. To implement this,
we persist not just presentations, but also their
path IDs, the same as used for expanded/selected paths.
To match cached nodes to already loaded nodes,
we add the new getPathElementType() method
to the PathElementIdProvider interface and implement
it in the cached node class. Normally the type is calculated
based on the real class, but for cached nodes we need their
type to match the type of the real node.
The CachedTreePresentationSupport interface will be used
by consumers of this saved state, such as tree models and trees.
For now, persist only texts. We can add other attributes,
such as colors, later. Persisting icons is tricky, but likely not needed,
as "loading" spinning icons are a good way to tell which nodes
have been loaded already.
Implement a mutable structure to hold the entire tree as well.
It'll be needed in the tree and its model, and those are already
complicated enough, so let's keep most logic out of them.
This structure holds not just cached nodes, but also the real
ones as they're loaded by the model, so we can continue
displaying cached children for the already loaded nodes.
This structure is short-lived and only exists while the tree
is being loaded and expanded, so it's OK to cache anything
there, it'll be all cleared soon enough.
GitOrigin-RevId: 8b4bf5f5be0659fdbdae8ba5d5f52b6584b0c00a
We'll need to update the cached presentation whenever
a node is expanded or collapsed, so we need a single
place for this logic.
GitOrigin-RevId: e8a5807849b442e0e4d7d496d7af6161d2cfea35
+ tests (junit4) were flaky due to interactions with other tests. Junit5 test-infra has better isolation => migrate tests to junit5 to alleviate flakiness
GitOrigin-RevId: 71f00eef99e94234561dfbcc248974c89d3d2955
+ .ourSourceRoot is static: not-cleaned but already invalid value could be inherited by the next test => test-order-sensitive failure ('alien file')
GitOrigin-RevId: b7ff85d33579ee4ea067b3783077b889e62f7907
+ junit5 provide better test isolation -- helps to deal with test failure caused by test order change
GitOrigin-RevId: 665829d5731f7b4ec5126f633a426ac8ef5dde96
+ early .myVfsData assignment in ctor is overwritten on .connect() anyway -> useless, but opens a window for 'alien file' creation. Better leave .myVfsData=null until .connect() => have explicit NPE immediately, than 'alien file' assertion later on
GitOrigin-RevId: 28cf35b0470bfebbb331a5f60494f3b55ba6e0b1
+ DurableMapFactory accepts DataExternalizerEx for values, but if it also implements KeyDescriptorEx -- will use equality provided for avoiding dummy value update
GitOrigin-RevId: 1a451ab1cca0a58f77a26ee7aeb1a4dabdd7570e
- wraps old-school KeyDescriptor/DataExternalizer into KeyDescriptorEx/DataExternalizerEx -- not the most efficient impl, but will help the first phase of transition
GitOrigin-RevId: 979df000b3fbdd084e2fa9be709d40327eef9a61
+ New mmapped-based storages were initially created for VFS, and located in apt package/module. Nowadays they are used more widely across codebase => need own module
+ Some test-support classes were moved to `platform.testFramework` to be used from multiple test modules
+ multiple 'exposed API' adjustments
GitOrigin-RevId: a759771f1784df7d9528c405cc3e7d1f7c4cd655
`EventQueue.getNextEvent` blocks and prevents coroutine from exiting.
Fixes
DBE-20566 com.intellij.database.actions.DbNavigationActionsTest is timing out
GitOrigin-RevId: 877de080c2e8517ddf69b51293e6722060e3e7c5
All dependencies of essential plugin should be added as essential plugins otherwise on disabling any of them the product can't be loaded
GitOrigin-RevId: 1ce336e294b07d3672cdbb9279e3dabca947f48c
'origin/feature/branch' can be both 'branch on origin/feature remote' and 'feature/branch on origin remote'.
Fix regression after 8d15cc6a7bfffd57d16f09fe306832e790505196
GitOrigin-RevId: 0927d391a0f459807ad9e42451dfcecd3f31fd74
do not download library file in BuildDependenciesJps if it was already downloaded to .m2/repository
GitOrigin-RevId: 5366422d39951424eafb9525de15e4c836437204
Since `invokeAndWait` parks the thread of the caller, we can conclude that the spawned computation never outlives the caller. Knowing this, we can always propagate the context job to the computation, obtaining better cancellation guarantees.
GitOrigin-RevId: 221e3ee12d1ce84094ad65fa8b7fafa46d10930c