OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * Support for client code that interacts with the analysis domain of an | 6 * Support for client code that interacts with the analysis domain of an |
7 * analysis server. | 7 * analysis server. |
8 * | 8 * |
9 * Plugins can gain access to the request handler that implements the analysis | 9 * Plugins can gain access to the request handler that implements the analysis |
10 * domain in order to extend the functionality of that domain. The class | 10 * domain in order to extend the functionality of that domain. The class |
(...skipping 15 matching lines...) Expand all Loading... |
26 * } | 26 * } |
27 */ | 27 */ |
28 library analysis_server.plugin.analysis.analysis_domain; | 28 library analysis_server.plugin.analysis.analysis_domain; |
29 | 29 |
30 import 'dart:async'; | 30 import 'dart:async'; |
31 | 31 |
32 import 'package:analysis_server/plugin/protocol/protocol.dart' | 32 import 'package:analysis_server/plugin/protocol/protocol.dart' |
33 show AnalysisService; | 33 show AnalysisService; |
34 import 'package:analysis_server/src/plugin/server_plugin.dart'; | 34 import 'package:analysis_server/src/plugin/server_plugin.dart'; |
35 import 'package:analyzer/src/generated/engine.dart' | 35 import 'package:analyzer/src/generated/engine.dart' |
36 show AnalysisContext, ComputedResult; | 36 show AnalysisContext, ResultChangedEvent; |
37 import 'package:analyzer/src/generated/source.dart' show Source; | 37 import 'package:analyzer/src/generated/source.dart' show Source; |
38 import 'package:analyzer/task/model.dart' show ResultDescriptor; | 38 import 'package:analyzer/task/model.dart' show ResultDescriptor; |
39 import 'package:plugin/plugin.dart'; | 39 import 'package:plugin/plugin.dart'; |
40 | 40 |
41 /** | 41 /** |
42 * The identifier of the extension point that allows plugins to get access to an | 42 * The identifier of the extension point that allows plugins to get access to an |
43 * [AnalysisDomain]. The object used as an extension must be a | 43 * [AnalysisDomain]. The object used as an extension must be a |
44 * [SetAnalysisDomain]. | 44 * [SetAnalysisDomain]. |
45 */ | 45 */ |
46 final String SET_ANALYSIS_DOMAIN_EXTENSION_POINT_ID = Plugin.join( | 46 final String SET_ANALYSIS_DOMAIN_EXTENSION_POINT_ID = Plugin.join( |
(...skipping 15 matching lines...) Expand all Loading... |
62 abstract class AnalysisDomain { | 62 abstract class AnalysisDomain { |
63 /** | 63 /** |
64 * Return the stream that is notified when a new value for the given | 64 * Return the stream that is notified when a new value for the given |
65 * [result] is computed. | 65 * [result] is computed. |
66 * | 66 * |
67 * This method should be used by plugins that need to perform some additional | 67 * This method should be used by plugins that need to perform some additional |
68 * processing after analysis has completed. One example would be a plugin that | 68 * processing after analysis has completed. One example would be a plugin that |
69 * needed to send a notification to the client because some data was now | 69 * needed to send a notification to the client because some data was now |
70 * invalidated. | 70 * invalidated. |
71 */ | 71 */ |
72 Stream<ComputedResult> onResultComputed(ResultDescriptor result); | 72 Stream<ResultChangedEvent> onResultChanged(ResultDescriptor result); |
73 | 73 |
74 /** | 74 /** |
75 * Schedule sending the given [service] notifications for the given [source] | 75 * Schedule sending the given [service] notifications for the given [source] |
76 * in the given [context]. | 76 * in the given [context]. |
77 */ | 77 */ |
78 void scheduleNotification( | 78 void scheduleNotification( |
79 AnalysisContext context, Source source, AnalysisService service); | 79 AnalysisContext context, Source source, AnalysisService service); |
80 } | 80 } |
OLD | NEW |