Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: pkg/analyzer_plugin/lib/plugin/plugin.dart

Issue 2970203002: Remove references to AnalysisDriver from the plugin mixin classes (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_plugin/lib/plugin/plugin.dart
diff --git a/pkg/analyzer_plugin/lib/plugin/plugin.dart b/pkg/analyzer_plugin/lib/plugin/plugin.dart
index fc9921e18382d7f5f413610d7a522cbd686aef54..0848d04f79a545c22e9d374673a72f1ac044e9bc 100644
--- a/pkg/analyzer_plugin/lib/plugin/plugin.dart
+++ b/pkg/analyzer_plugin/lib/plugin/plugin.dart
@@ -191,6 +191,17 @@ abstract class ServerPlugin {
AnalysisDriverGeneric createAnalysisDriver(ContextRoot contextRoot);
/**
+ * Return the driver being used to analyze the file with the given [path].
+ */
+ AnalysisDriverGeneric driverForPath(String path) {
mfairhurst 2017/07/05 22:50:51 Isn't this also a public usage of a private API?
Brian Wilkerson 2017/07/05 23:06:49 Yes, it is. But it seemed like an expedient step t
+ ContextRoot contextRoot = contextRootContaining(path);
+ if (contextRoot == null) {
+ return null;
+ }
+ return driverMap[contextRoot];
+ }
+
+ /**
* Handle an 'analysis.getNavigation' request.
*/
Future<AnalysisGetNavigationResult> handleAnalysisGetNavigation(
« no previous file with comments | « pkg/analyzer_plugin/lib/plugin/navigation_mixin.dart ('k') | pkg/analyzer_plugin/test/plugin/assist_mixin_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698