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

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

Issue 596893002: Rework launch data (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated Java side Created 6 years, 3 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/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 abc47c867543f8772b2c670f4b617dbcd7da2240..3900965f771ea774b3ffae21fa17504b703e0ee5 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -218,6 +218,11 @@ class AnalysisServer {
StreamController _onAnalysisCompleteController;
/**
+ * The controller that is notified when a single file has been analyzed.
+ */
+ StreamController<ChangeNotice> _onFileAnalyzedController;
+
+ /**
* True if any exceptions thrown by analysis should be propagated up the call
* stack.
*/
@@ -242,6 +247,7 @@ class AnalysisServer {
AnalysisEngine.instance.logger = new AnalysisLogger();
_onAnalysisStartedController = new StreamController.broadcast();
_onAnalysisCompleteController = new StreamController.broadcast();
+ _onFileAnalyzedController = new StreamController.broadcast();
running = true;
Notification notification = new ServerConnectedParams().toNotification();
channel.sendNotification(notification);
@@ -249,6 +255,17 @@ class AnalysisServer {
}
/**
+ * If the given notice applies to a file contained within an analysis root,
+ * notify interested parties that the file has been (at least partially)
+ * analyzed.
+ */
+ void fileAnalyzed(ChangeNotice notice) {
+ if (contextDirectoryManager.isInAnalysisRoot(notice.source.fullName)) {
+ _onFileAnalyzedController.add(notice);
+ }
+ }
+
+ /**
* Schedules execution of the given [ServerOperation].
*/
void scheduleOperation(ServerOperation operation) {
@@ -354,6 +371,11 @@ class AnalysisServer {
Stream get onAnalysisComplete => _onAnalysisCompleteController.stream;
/**
+ * The stream that is notified when a single file has been analyzed.
+ */
+ Stream get onFileAnalyzed => _onFileAnalyzedController.stream;
+
+ /**
* Adds the given [ServerOperation] to the queue, but does not schedule
* operations execution.
*/

Powered by Google App Engine
This is Rietveld 408576698