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( |