| 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_navigation.dart'; | 9 import 'package:analysis_server/src/computer/computer_navigation.dart'; |
| 10 import 'package:analysis_server/src/computer/computer_occurrences.dart'; | 10 import 'package:analysis_server/src/computer/computer_occurrences.dart'; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 _sendNotification(server, () { | 126 _sendNotification(server, () { |
| 127 var regions = new DartUnitHighlightsComputer(dartUnit).compute(); | 127 var regions = new DartUnitHighlightsComputer(dartUnit).compute(); |
| 128 var params = new protocol.AnalysisHighlightsParams(file, regions); | 128 var params = new protocol.AnalysisHighlightsParams(file, regions); |
| 129 server.sendNotification(params.toNotification()); | 129 server.sendNotification(params.toNotification()); |
| 130 }); | 130 }); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void sendAnalysisNotificationNavigation( | 133 void sendAnalysisNotificationNavigation( |
| 134 AnalysisServer server, String file, CompilationUnit dartUnit) { | 134 AnalysisServer server, String file, CompilationUnit dartUnit) { |
| 135 _sendNotification(server, () { | 135 _sendNotification(server, () { |
| 136 var computer = new DartUnitNavigationComputer(dartUnit); | 136 var computer = new DartUnitNavigationComputer(); |
| 137 computer.compute(); | 137 computer.compute(dartUnit); |
| 138 var params = new protocol.AnalysisNavigationParams( | 138 var params = new protocol.AnalysisNavigationParams( |
| 139 file, computer.regions, computer.targets, computer.files); | 139 file, computer.regions, computer.targets, computer.files); |
| 140 server.sendNotification(params.toNotification()); | 140 server.sendNotification(params.toNotification()); |
| 141 }); | 141 }); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void sendAnalysisNotificationOccurrences( | 144 void sendAnalysisNotificationOccurrences( |
| 145 AnalysisServer server, String file, CompilationUnit dartUnit) { | 145 AnalysisServer server, String file, CompilationUnit dartUnit) { |
| 146 _sendNotification(server, () { | 146 _sendNotification(server, () { |
| 147 var occurrences = new DartUnitOccurrencesComputer(dartUnit).compute(); | 147 var occurrences = new DartUnitOccurrencesComputer(dartUnit).compute(); |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 abstract class _SingleFileOperation extends SourceSensitiveOperation { | 441 abstract class _SingleFileOperation extends SourceSensitiveOperation { |
| 442 final String file; | 442 final String file; |
| 443 | 443 |
| 444 _SingleFileOperation(AnalysisContext context, this.file) : super(context); | 444 _SingleFileOperation(AnalysisContext context, this.file) : super(context); |
| 445 | 445 |
| 446 @override | 446 @override |
| 447 bool shouldBeDiscardedOnSourceChange(Source source) { | 447 bool shouldBeDiscardedOnSourceChange(Source source) { |
| 448 return source.fullName == file; | 448 return source.fullName == file; |
| 449 } | 449 } |
| 450 } | 450 } |
| OLD | NEW |