Skip to content

Fix issues with the initialization and refactor.#2

Merged
yaohaizh merged 1 commit intomasterfrom
yaohai_dev
Apr 16, 2018
Merged

Fix issues with the initialization and refactor.#2
yaohaizh merged 1 commit intomasterfrom
yaohai_dev

Conversation

@yaohaizh
Copy link
Copy Markdown
Contributor

No description provided.

@yaohaizh yaohaizh merged commit 6c2ad3b into master Apr 16, 2018
@yaohaizh yaohaizh deleted the yaohai_dev branch April 16, 2018 01:55
chagong added a commit that referenced this pull request Mar 30, 2026
- 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
chagong added a commit that referenced this pull request Mar 30, 2026
* 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 directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant