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.5
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.5||Oct 22, 2018|
|0.0.1-alpha.4||Jul 23, 2018|
|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|
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]
We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter, other
Platform components identified in package:
lib/src/utilities/completion/optype.dart. (-1.49 points)
lib/src/utilities/completion/optype.dart reported 3 hints:
line 135 col 31: 'getAncestor' is deprecated and shouldn't be used.
line 141 col 10: 'getAncestor' is deprecated and shouldn't be used.
line 145 col 10: 'getAncestor' is deprecated and shouldn't be used.
lib/utilities/completion/type_member_contributor.dart. (-0.50 points)
lib/utilities/completion/type_member_contributor.dart reported 1 hint:
line 154 col 22: 'getAncestor' is deprecated and shouldn't be used.
The description is too short. (-20 points)
Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package. Common file name patterns include:
example.dart or you could also use
Package is pre-v0.1 release. (-10 points)
While there is nothing inherently wrong with versions of
0.0.*, it usually means that the author is still experimenting with the general direction of the API.
Package is pre-release. (-5 points)
Pre-release versions should be used with caution, their API may change in breaking ways.
|Dart SDK||>=1.8.0 <3.0.0|