Commit Graph

4 Commits

Author SHA1 Message Date
Danny Tuppeny fb22849379 [analysis_server] Extract expected offsets in Extract Local test
Follow-up from https://dart-review.googlesource.com/c/sdk/+/441840.

Change-Id: I085099fde59fce052b01fd06a8cc41a83f55ac24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-07-29 11:45:03 -07:00
Danny Tuppeny 02ea7d0b14 [analysis_server] [lsp] Support return/yield/break/continue in Document Highlights
This adds support for keywords like `return`, `yield`, `break`, `continue` to Document Highlights. For break/continue, the matching loop keyword (`do`/`while`/`for`) is also highlighted (and this works in both directions). This behaviour matches what I see for TypeScript in VS Code.

This is only supported for LSP because the legacy protocol groups these by "Elements" which we don't have for loops (though since IntelliJ uses its own data for occurrences, it's not clear to me if anyone is using Occurrences over the legacy protocol).

Fixes https://github.com/dart-lang/sdk/issues/61170

Change-Id: I5563ec0a91a6fe33d10a6317d33e9256b3c50209
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-07-24 10:47:40 -07:00
Danny Tuppeny 17f3a6ec30 [analysis_server] Convert more LSP handlers to work over the legacy protocol
Change-Id: I9bd1f3ffd9bcdb017a4208e4aedcfb7436259fc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318700
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-07 15:27:46 +00:00
Danny Tuppeny 1b38b7bb7b [analysis_server] Move TestCode from analysis_server to analyzer
Change-Id: I81333240d7693b66416ce6bb308f980b264a2238
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264920
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-19 19:58:47 +00:00