| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // performAnalysisTask that will be called when the task has been computed | 140 // performAnalysisTask that will be called when the task has been computed |
| 141 // but before it is performed and send notification in the function: | 141 // but before it is performed and send notification in the function: |
| 142 // | 142 // |
| 143 // AnalysisResult result = context.performAnalysisTask((taskDescription) { | 143 // AnalysisResult result = context.performAnalysisTask((taskDescription) { |
| 144 // sendStatusNotification(context.toString(), taskDescription); | 144 // sendStatusNotification(context.toString(), taskDescription); |
| 145 // }); | 145 // }); |
| 146 // prepare results | 146 // prepare results |
| 147 AnalysisResult result = context.performAnalysisTask(); | 147 AnalysisResult result = context.performAnalysisTask(); |
| 148 List<ChangeNotice> notices = result.changeNotices; | 148 List<ChangeNotice> notices = result.changeNotices; |
| 149 if (notices == null) { | 149 if (notices == null) { |
| 150 server.sendContextAnalysisDoneNotifications(context); |
| 150 return; | 151 return; |
| 151 } | 152 } |
| 152 // process results | 153 // process results |
| 153 sendNotices(server, notices); | 154 sendNotices(server, notices); |
| 154 updateIndex(server.index, notices); | 155 updateIndex(server.index, notices); |
| 155 // continue analysis | 156 // continue analysis |
| 156 server.addOperation(new PerformAnalysisOperation(context, true)); | 157 server.addOperation(new PerformAnalysisOperation(context, true)); |
| 157 } | 158 } |
| 158 | 159 |
| 159 /** | 160 /** |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // HTML | 207 // HTML |
| 207 { | 208 { |
| 208 HtmlUnit htmlUnit = notice.htmlUnit; | 209 HtmlUnit htmlUnit = notice.htmlUnit; |
| 209 if (htmlUnit != null) { | 210 if (htmlUnit != null) { |
| 210 index.indexHtmlUnit(context, htmlUnit); | 211 index.indexHtmlUnit(context, htmlUnit); |
| 211 } | 212 } |
| 212 } | 213 } |
| 213 } | 214 } |
| 214 } | 215 } |
| 215 } | 216 } |
| OLD | NEW |