Commit ff3671a
authored
feat: progressive project tree view during import (#982)
* feat: progressive project tree view during import
Show Java project names in the tree view progressively as they are
imported, instead of waiting for the entire import to complete.
Key changes:
- Use serverRunning() API (v0.14) instead of serverReady() so the
tree view can start rendering before import finishes
- Add addProgressiveProjects() to create ProjectNode items directly
from ProjectsImported notification URIs without querying the server
- Guard getChildren() from entering getRootNodes() during progressive
loading to avoid blocking on server queries
- Keep TreeView progress spinner visible until first items arrive
- After import completes, trigger full refresh to replace placeholder
items with complete data from the server
This reduces perceived loading time for large projects (e.g., 436
Gradle subprojects) from ~7 minutes to ~1 minute.
* Downgrade version from 0.27.1 to 0.27.0
* Update version to 0.27.1 in package-lock.json
* fix: address review feedback on progressive loading
- Extract startServerReadyWait() and call it unconditionally in
initializeJavaLanguageServerApis() so isServerReady is set correctly
even if onDidProjectsImport fires before ready() (fixes #6)
- Restore ready() to not start serverReady() wait inline, keeping its
semantics consistent for other callers like syncHandler,
upgradeManager, BuildArtifactTaskProvider (fixes #4)
- Add .catch() on serverReady().then() to avoid unhandled promise
rejections if the server fails to start (fixes #5)
- Restore debounce=true on onDidClasspathUpdate when server is ready
to avoid burst refreshes (fixes #7)
- Add 30s timeout on _progressiveItemsReady await to prevent
getChildren() from hanging indefinitely (fixes #2)
- Resolve _progressiveItemsReady in doRefresh() to prevent stale
getChildren() calls from hanging
* fix: remove console.error to satisfy no-console tslint rule
* Fix: fall through to getRootNodes() when no progressive items arrive
After the 30s timeout, if no progressive notifications were received
(e.g., eclipse.jdt.ls progressive notifications not yet available),
fall through to the normal getRootNodes() path instead of returning
an empty array. This ensures the worst case matches today's behavior.
Addresses review comment from wenytang-ms.
* Simplify progressive loading: remove timeout fallback and return root items directly1 parent c677dbc commit ff3671a
File tree
3 files changed
+161
-4
lines changed- src
- languageServerApi
- views
3 files changed
+161
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
31 | 47 | | |
32 | 48 | | |
33 | 49 | | |
34 | 50 | | |
35 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
36 | 76 | | |
37 | 77 | | |
38 | 78 | | |
| |||
49 | 89 | | |
50 | 90 | | |
51 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
52 | 97 | | |
53 | 98 | | |
54 | | - | |
55 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
56 | 109 | | |
57 | 110 | | |
58 | 111 | | |
59 | 112 | | |
60 | 113 | | |
61 | 114 | | |
62 | | - | |
63 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
64 | 125 | | |
65 | 126 | | |
66 | 127 | | |
| |||
91 | 152 | | |
92 | 153 | | |
93 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
94 | 163 | | |
95 | 164 | | |
96 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
123 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
124 | 154 | | |
125 | 155 | | |
126 | 156 | | |
| |||
167 | 197 | | |
168 | 198 | | |
169 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
170 | 206 | | |
171 | 207 | | |
172 | 208 | | |
173 | 209 | | |
174 | 210 | | |
175 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
176 | 262 | | |
177 | 263 | | |
178 | 264 | | |
| |||
0 commit comments