dart_codemod icon indicating copy to clipboard operation
dart_codemod copied to clipboard

Add an ElementVisitingSuggestorMixin for more advanced codemods

Open evanweible-wf opened this issue 7 years ago • 1 comments

The AstVisitingSuggestorMixin leverages the AstVisitor interface to help create suggestors, but it only makes the parsed AST available. Some more advanced or complex codemods may require additional information that is only available by resolving the elements via the analyzer. This would require setting up an AnalysisDriver or something similar from the analyzer package to resolve the elements.

Being able to leverage the ElementVisitor pattern would allow consumers to write suggestors that have more information with which to make decisions by being able to obtain things like the source of a type or an element's inheritance tree.

evanweible-wf avatar Jan 15 '19 04:01 evanweible-wf

I needed something similar so I submitted a PR would #38 work?

TimWhiting avatar Feb 20 '21 22:02 TimWhiting