dart-sdk/pkg/analyzer_plugin
Dan Rubel 1231e90fee Code complete identifiers not directly referenced by the analyzer AST
The fasta parser sometimes "drops" unexpected tokens during recovery.
When this happens, the dropped or skipped token is not reported to
the listeners, and thus does not become part of the analyzer's AST.
These tokens are still in the token stream, but will not be found
by the existing CompletionTarget mechanism.

For example, the fasta parser parses
'if (v i) {}' as 'if (v) {}' and drops the 'i' token.

This CL introduces a new CompletionTarget.droppedToken field.
If a keyword or identifier has been dropped by the parser,
but overlaps the code completion offset, then that token
is placed into this new field.

In the example above, when code completing the 'i',
the CompletionTarget will now be
containingNode = '(v)'
entity         = ')'
droppedToken   = 'i'

Change-Id: I15e43529ab4a72de9500c521be278fa13ae68d99
Reviewed-on: https://dart-review.googlesource.com/31285
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-22 21:55:35 +00:00
..
doc Add a description of the packages used to implement a plugin 2017-11-06 14:11:59 +00:00
lib Code complete identifiers not directly referenced by the analyzer AST 2017-12-22 21:55:35 +00:00
test Code complete identifiers not directly referenced by the analyzer AST 2017-12-22 21:55:35 +00:00
tool/spec Add two new element types to the protocol. 2017-10-18 19:02:47 +00:00
analysis_options.yaml Disable a not-yet-defined lint 2017-06-23 09:37:34 -07:00
CHANGELOG.md Create the directory for the plugin package 2017-01-30 13:21:37 -08:00
LICENSE Create the directory for the plugin package 2017-01-30 13:21:37 -08:00
pubspec.yaml More clean-up prior to publishing 2017-08-25 14:11:42 -07:00
README.md Initial documentation for the plugin package 2017-07-06 11:37:52 -07:00

analyzer_plugin

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.