| 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.
|
| */
|
|
|