Introduce explicit origin flags on ConstructorElement and its fragment (isOriginDeclaration, isOriginImplicitDefault, isOriginMixinApplication) and deprecate isSynthetic in favor of these. Define isSynthetic as the inverse of isOriginDeclaration to preserve the legacy meaning while encouraging clients to use the more precise origin predicates. Eventually `Element.isSynthetic` also will be deprecated and removed. This CL is a step toward this goal, migrating what is possible with new flags. Update analyzer internals to rely on the new origin flags when checking for non-factory generative constructors, building synthetic constructors for mixin applications, and walking constructor chains in index/search logic. Only constructors with an origin declaration are now treated as declarations, and nonSynthetic is defined in terms of origin declarations rather than synthetic-ness. Add corresponding origin descriptors to the manifest enum and bump AnalysisDriver.DATA_VERSION. Adjust analysis server refactorings and fixes to distinguish implicit default constructors from other synthetic constructors. Code paths that previously checked isSynthetic for default constructors now check isOriginImplicitDefault, and mixin-application traversal uses isOriginMixinApplication. Overall, this change removes the overloaded semantics of isSynthetic, makes constructor provenance explicit, and prepares the element model for future DeCo and primary-constructor scenarios without relying on brittle synthetic heuristics. Change-Id: I8568bdfe478867af313a4d13afe1f2859394831b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/465201 Reviewed-by: Paul Berry <paulberry@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com>
A framework for building plugins for the analysis server.
Warning
This package is for legacy support and is not recommended for new plugin development.
For modern plugin implementations, use the
analysis_server_pluginpackage instead.See its documentation for the latest architecture and examples.
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.