| 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 analysis_server.src.get_handler; | 5 library analysis_server.src.get_handler; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:convert'; | 9 import 'dart:convert'; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 /** | 1003 /** |
| 1004 * Write the status of the analysis domain (on the main status page) to the | 1004 * Write the status of the analysis domain (on the main status page) to the |
| 1005 * given [buffer] object. | 1005 * given [buffer] object. |
| 1006 */ | 1006 */ |
| 1007 void _writeAnalysisStatus(StringBuffer buffer) { | 1007 void _writeAnalysisStatus(StringBuffer buffer) { |
| 1008 AnalysisServer analysisServer = _server.analysisServer; | 1008 AnalysisServer analysisServer = _server.analysisServer; |
| 1009 Map<Folder, AnalysisContext> folderMap = analysisServer.folderMap; | 1009 Map<Folder, AnalysisContext> folderMap = analysisServer.folderMap; |
| 1010 List<Folder> folders = folderMap.keys.toList(); | 1010 List<Folder> folders = folderMap.keys.toList(); |
| 1011 folders.sort((Folder first, Folder second) => | 1011 folders.sort((Folder first, Folder second) => |
| 1012 first.shortName.compareTo(second.shortName)); | 1012 first.shortName.compareTo(second.shortName)); |
| 1013 AnalysisOptionsImpl options = | 1013 AnalysisOptionsImpl options = analysisServer.contextManager.defaultOptions; |
| 1014 analysisServer.contextDirectoryManager.defaultOptions; | |
| 1015 ServerOperationQueue operationQueue = analysisServer.operationQueue; | 1014 ServerOperationQueue operationQueue = analysisServer.operationQueue; |
| 1016 | 1015 |
| 1017 buffer.write('<h3>Analysis Domain</h3>'); | 1016 buffer.write('<h3>Analysis Domain</h3>'); |
| 1018 _writeTwoColumns(buffer, (StringBuffer buffer) { | 1017 _writeTwoColumns(buffer, (StringBuffer buffer) { |
| 1019 if (operationQueue.isEmpty) { | 1018 if (operationQueue.isEmpty) { |
| 1020 buffer.write('<p>Status: Done analyzing</p>'); | 1019 buffer.write('<p>Status: Done analyzing</p>'); |
| 1021 } else { | 1020 } else { |
| 1022 ServerOperation operation = operationQueue.peek(); | 1021 ServerOperation operation = operationQueue.peek(); |
| 1023 if (operation is PerformAnalysisOperation) { | 1022 if (operation is PerformAnalysisOperation) { |
| 1024 Folder folder = _keyForValue(folderMap, operation.context); | 1023 Folder folder = _keyForValue(folderMap, operation.context); |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 */ | 1625 */ |
| 1627 static String makeLink( | 1626 static String makeLink( |
| 1628 String path, Map<String, String> params, String innerHtml, | 1627 String path, Map<String, String> params, String innerHtml, |
| 1629 [bool hasError = false]) { | 1628 [bool hasError = false]) { |
| 1630 Uri uri = new Uri(path: path, queryParameters: params); | 1629 Uri uri = new Uri(path: path, queryParameters: params); |
| 1631 String href = HTML_ESCAPE.convert(uri.toString()); | 1630 String href = HTML_ESCAPE.convert(uri.toString()); |
| 1632 String classAttribute = hasError ? ' class="error"' : ''; | 1631 String classAttribute = hasError ? ' class="error"' : ''; |
| 1633 return '<a href="$href"$classAttribute>$innerHtml</a>'; | 1632 return '<a href="$href"$classAttribute>$innerHtml</a>'; |
| 1634 } | 1633 } |
| 1635 } | 1634 } |
| OLD | NEW |