OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library operation.analysis; | 5 library operation.analysis; |
6 | 6 |
7 import 'package:analysis_server/src/analysis_server.dart'; | 7 import 'package:analysis_server/src/analysis_server.dart'; |
8 import 'package:analysis_server/src/computer/computer_highlights.dart'; | 8 import 'package:analysis_server/src/computer/computer_highlights.dart'; |
9 import 'package:analysis_server/src/computer/computer_highlights2.dart'; | 9 import 'package:analysis_server/src/computer/computer_highlights2.dart'; |
10 import 'package:analysis_server/src/computer/computer_outline.dart'; | 10 import 'package:analysis_server/src/computer/computer_outline.dart'; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 void sendAnalysisNotificationAnalyzedFiles(AnalysisServer server) { | 130 void sendAnalysisNotificationAnalyzedFiles(AnalysisServer server) { |
131 _sendNotification(server, () { | 131 _sendNotification(server, () { |
132 // TODO(paulberry): if it proves to be too inefficient to recompute the set | 132 // TODO(paulberry): if it proves to be too inefficient to recompute the set |
133 // of analyzed files each time analysis is complete, consider modifying the | 133 // of analyzed files each time analysis is complete, consider modifying the |
134 // analysis engine to update this set incrementally as analysis is | 134 // analysis engine to update this set incrementally as analysis is |
135 // performed. | 135 // performed. |
136 LibraryDependencyCollector collector = | 136 LibraryDependencyCollector collector = |
137 new LibraryDependencyCollector(server.getAnalysisContexts().toList()); | 137 new LibraryDependencyCollector(server.analysisContexts.toList()); |
138 Set<String> analyzedFiles = collector.collectLibraryDependencies(); | 138 Set<String> analyzedFiles = collector.collectLibraryDependencies(); |
139 Set<String> prevAnalyzedFiles = server.prevAnalyzedFiles; | 139 Set<String> prevAnalyzedFiles = server.prevAnalyzedFiles; |
140 if (prevAnalyzedFiles != null && | 140 if (prevAnalyzedFiles != null && |
141 prevAnalyzedFiles.length == analyzedFiles.length && | 141 prevAnalyzedFiles.length == analyzedFiles.length && |
142 prevAnalyzedFiles.difference(analyzedFiles).isEmpty) { | 142 prevAnalyzedFiles.difference(analyzedFiles).isEmpty) { |
143 // No change to the set of analyzed files. No need to send another | 143 // No change to the set of analyzed files. No need to send another |
144 // notification. | 144 // notification. |
145 return; | 145 return; |
146 } | 146 } |
147 server.prevAnalyzedFiles = analyzedFiles; | 147 server.prevAnalyzedFiles = analyzedFiles; |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 abstract class _SingleFileOperation extends SourceSensitiveOperation { | 542 abstract class _SingleFileOperation extends SourceSensitiveOperation { |
543 final String file; | 543 final String file; |
544 | 544 |
545 _SingleFileOperation(AnalysisContext context, this.file) : super(context); | 545 _SingleFileOperation(AnalysisContext context, this.file) : super(context); |
546 | 546 |
547 @override | 547 @override |
548 bool shouldBeDiscardedOnSourceChange(Source source) { | 548 bool shouldBeDiscardedOnSourceChange(Source source) { |
549 return source.fullName == file; | 549 return source.fullName == file; |
550 } | 550 } |
551 } | 551 } |
OLD | NEW |