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

Unified Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 2582753003: Fix analysis.getNavigation with the new analysis driver. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/computer/new_notifications.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 7751fb63ddd1401d7be1fcc6d190d00dc659c3ee..5ee2afdbf4865fe44c23bcc49b96b95fae6cafa0 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -678,6 +678,19 @@ class AnalysisServer {
}
/**
+ * Return the [nd.AnalysisDriver] for the "innermost" context whose associated
+ * folder is or contains the given path. ("innermost" refers to the nesting
+ * of contexts, so if there is a context for path /foo and a context for
+ * path /foo/bar, then the innermost context containing /foo/bar/baz.dart is
+ * the context for /foo/bar.)
+ *
+ * If no context contains the given path, `null` is returned.
+ */
+ nd.AnalysisDriver getContainingDriver(String path) {
+ return contextManager.getDriverFor(path);
+ }
+
+ /**
* Return the primary [ContextSourcePair] representing the given [path].
*
* The [AnalysisContext] of this pair will be the context that explicitly
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/computer/new_notifications.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698