A framework for building plugins for the analysis server.
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.
Post issues and feature requests on the issue tracker.
Questions and discussions are welcome at the Dart Analyzer Discussion Group.
See the LICENSE file.
Add this to your package's pubspec.yaml file:
dependencies: analyzer_plugin: "^0.0.1-alpha.3"
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:analyzer_plugin/channel/channel.dart'; import 'package:analyzer_plugin/plugin/assist_mixin.dart'; import 'package:analyzer_plugin/plugin/completion_mixin.dart'; import 'package:analyzer_plugin/plugin/fix_mixin.dart'; import 'package:analyzer_plugin/plugin/folding_mixin.dart'; import 'package:analyzer_plugin/plugin/highlights_mixin.dart'; import 'package:analyzer_plugin/plugin/kythe_mixin.dart'; import 'package:analyzer_plugin/plugin/navigation_mixin.dart'; import 'package:analyzer_plugin/plugin/occurrences_mixin.dart'; import 'package:analyzer_plugin/plugin/outline_mixin.dart'; import 'package:analyzer_plugin/plugin/plugin.dart'; import 'package:analyzer_plugin/protocol/protocol.dart'; import 'package:analyzer_plugin/protocol/protocol_common.dart'; import 'package:analyzer_plugin/protocol/protocol_constants.dart'; import 'package:analyzer_plugin/protocol/protocol_generated.dart'; import 'package:analyzer_plugin/starter.dart'; import 'package:analyzer_plugin/utilities/analyzer_converter.dart'; import 'package:analyzer_plugin/utilities/assist/assist.dart'; import 'package:analyzer_plugin/utilities/assist/assist_contributor_mixin.dart'; import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart'; import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart'; import 'package:analyzer_plugin/utilities/completion/completion_core.dart'; import 'package:analyzer_plugin/utilities/completion/inherited_reference_contributor.dart'; import 'package:analyzer_plugin/utilities/completion/relevance.dart'; import 'package:analyzer_plugin/utilities/completion/suggestion_builder.dart'; import 'package:analyzer_plugin/utilities/completion/type_member_contributor.dart'; import 'package:analyzer_plugin/utilities/fixes/fix_contributor_mixin.dart'; import 'package:analyzer_plugin/utilities/fixes/fixes.dart'; import 'package:analyzer_plugin/utilities/folding/folding.dart'; import 'package:analyzer_plugin/utilities/generator.dart'; import 'package:analyzer_plugin/utilities/highlights/highlights.dart'; import 'package:analyzer_plugin/utilities/kythe/entries.dart'; import 'package:analyzer_plugin/utilities/navigation/navigation.dart'; import 'package:analyzer_plugin/utilities/occurrences/occurrences.dart'; import 'package:analyzer_plugin/utilities/outline/outline.dart'; import 'package:analyzer_plugin/utilities/pair.dart'; import 'package:analyzer_plugin/utilities/range_factory.dart'; import 'package:analyzer_plugin/utilities/subscriptions/subscription_manager.dart';
|0.0.1-alpha.3||May 30, 2018|
|0.0.1-alpha.2||Mar 26, 2018|
|0.0.1-alpha.1||Mar 12, 2018|
|0.0.1-alpha.0||Aug 25, 2017|
We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Detected platforms: Flutter, other
Platform components identified in package:
Package is pre-release.
Pre-release versions should be used with caution, their API may change in breaking ways.
The description is too short.
Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.
Package is pre-v1 release.
While there is nothing inherently wrong with versions of
0.*.*, it usually means that the author is still experimenting with the general direction API.
Maintain an example.
Create a short demo in the
example/directory to show how to use this package. Common file name patterns include:
example.dartor you could also use
|Dart SDK||>=1.8.0 <2.0.0|