Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented May 22, 2025

Fixes #1410

  • Extract the source definition from the document and use as tooltip
  • Improve the tooltip for the root item
  • Fix some consequential timing issues on restoring documents with the outline open
  • Fix thread safety and yield to main thread while constructing symbol tree to avoid blocking main thread.
  • Update some code style of ValaSymbolItem and move some code from ValaSymbolItem into the construct clause

It proved simpler and better to copy the definition from the document rather than trying to reconstruct from the parsed symbols. The tooltip includes text to the end of the first line pointed to by the symbol.source_reference as this may contain extra useful information such as parameters and/or comments.

Screenshot from 2025-05-22 19 29 05

@jeremypw
Copy link
Collaborator Author

jeremypw commented May 23, 2025

Getting crash when starting up with certain documents/conditions although opening same documents from sidebar does not cause problems - diagnosing ...

@jeremypw jeremypw force-pushed the jeremypw/vala-symbols/improve-tooltip branch from bf859d7 to 2764aec Compare May 23, 2025 21:40
@jeremypw
Copy link
Collaborator Author

Looks like the crashing was due to accessing the source view from a separate parsing thread without locking it. This is now fixed. The parsing thread is now made to yield to the main thread after each child construction and this allows other documents to load and the UI to be used even though there is a document (e.g. a vapi) that takes a long time to finish parsing. Because of this the time allowed to construct the symbol pane has been increased.

@jeremypw jeremypw mentioned this pull request May 26, 2025
14 tasks
@jeremypw jeremypw marked this pull request as ready for review May 29, 2025 14:57
@jeremypw jeremypw requested a review from a team May 29, 2025 14:57
@jeremypw jeremypw changed the title Jeremypw/vala symbols/improve tooltip Show more information in Vala symbol tooltip Jun 1, 2025
@jeremypw jeremypw merged commit 35e1072 into master Jun 9, 2025
6 checks passed
@jeremypw jeremypw deleted the jeremypw/vala-symbols/improve-tooltip branch June 9, 2025 18:13
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.

Add more information to Symbol plugin tooltips

3 participants