dart-sdk/pkg/analyzer_plugin
Danny Tuppeny d97c3e8702 [analysis_server] Fix updating of selections in change builder when additional edits are made
This fixes a few minor issues:

- Setting a new selection position did not remove a previously set selection range (which could result in a mismatched offset/length due to how the resulting change merges the position/range)
- Setting a new selection range did not update a previously set selection position
- Inserting new changes before a change that sets a selection range only updated the selection position, not selection range
- Setting a selection range/position after another change that inserts only updated the selection position to compensate and not the selection range

These issues led to cases where selection ranges could be incorrect, or even overlap with linked edit groups that could cause errors that caused code action requests to fail.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4184

Change-Id: I43e2a8361c97b2eccb2d6b426a75eda5cc811e06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261682
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-28 17:32:24 +00:00
..
doc Add a highlight kind for record literals 2022-08-26 21:22:53 +00:00
lib [analysis_server] Fix updating of selections in change builder when additional edits are made 2022-09-28 17:32:24 +00:00
test [analysis_server] Fix updating of selections in change builder when additional edits are made 2022-09-28 17:32:24 +00:00
tool/spec Fix typos 2022-09-16 19:35:00 +00:00
.gitignore pkg/analyzer_plugin: support the latest pkg:analyzer 2019-04-24 02:26:26 +00:00
analysis_options.yaml [analyzer] use package:lints for pkg/analysis_server_client, pkg/analyzer_plugin 2022-07-06 19:54:00 +00:00
CHANGELOG.md analyzer_plugin: Support latest analyzer in pubspec 2022-09-23 21:57:49 +00:00
LICENSE Update LICENSE 2021-04-07 10:28:38 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
pubspec.yaml analyzer_plugin: Support latest analyzer in pubspec 2022-09-23 21:57:49 +00:00
README.md [pkg] normalize the headers of the pkg/ readmes 2022-05-31 21:00:13 +00:00

pub package package publisher

A framework for building plugins for the analysis server.

Usage

Note: The plugin support is not currently available for general use.

Plugins are written in Dart and are run in the same VM as the analysis server. The analysis server runs each plugin in a separate isolate and communicates with the plugin using a plugin API. This API is similar to the API used by the analysis server to communicate with clients.

Plugins are automatically discovered and run by the analysis server.

This package contains support code to make it easier to write a plugin. There is a tutorial describing how to use the support in this package.

Support

Post issues and feature requests on the issue tracker.

Questions and discussions are welcome at the Dart Analyzer Discussion Group.

License

See the LICENSE file.