Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Side by Side Diff: pkg/analysis_server/lib/src/status/get_handler.dart

Issue 1223413003: Hook for overriding the ContextManager and some code clean-up (with more to follow) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.status.get_handler; 5 library analysis_server.src.status.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 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 /** 1035 /**
1036 * Write the status of the analysis domain (on the main status page) to the 1036 * Write the status of the analysis domain (on the main status page) to the
1037 * given [buffer] object. 1037 * given [buffer] object.
1038 */ 1038 */
1039 void _writeAnalysisStatus(StringBuffer buffer) { 1039 void _writeAnalysisStatus(StringBuffer buffer) {
1040 AnalysisServer analysisServer = _server.analysisServer; 1040 AnalysisServer analysisServer = _server.analysisServer;
1041 Map<Folder, AnalysisContext> folderMap = analysisServer.folderMap; 1041 Map<Folder, AnalysisContext> folderMap = analysisServer.folderMap;
1042 List<Folder> folders = folderMap.keys.toList(); 1042 List<Folder> folders = folderMap.keys.toList();
1043 folders.sort((Folder first, Folder second) => 1043 folders.sort((Folder first, Folder second) =>
1044 first.shortName.compareTo(second.shortName)); 1044 first.shortName.compareTo(second.shortName));
1045 AnalysisOptionsImpl options = 1045 AnalysisOptionsImpl options = analysisServer.contextManager.defaultOptions;
1046 analysisServer.contextDirectoryManager.defaultOptions;
1047 ServerOperationQueue operationQueue = analysisServer.operationQueue; 1046 ServerOperationQueue operationQueue = analysisServer.operationQueue;
1048 1047
1049 buffer.write('<h3>Analysis Domain</h3>'); 1048 buffer.write('<h3>Analysis Domain</h3>');
1050 _writeTwoColumns(buffer, (StringBuffer buffer) { 1049 _writeTwoColumns(buffer, (StringBuffer buffer) {
1051 if (operationQueue.isEmpty) { 1050 if (operationQueue.isEmpty) {
1052 buffer.write('<p>Status: Done analyzing</p>'); 1051 buffer.write('<p>Status: Done analyzing</p>');
1053 } else { 1052 } else {
1054 ServerOperation operation = operationQueue.peek(); 1053 ServerOperation operation = operationQueue.peek();
1055 if (operation is PerformAnalysisOperation) { 1054 if (operation is PerformAnalysisOperation) {
1056 Folder folder = _keyForValue(folderMap, operation.context); 1055 Folder folder = _keyForValue(folderMap, operation.context);
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 */ 1630 */
1632 static String makeLink( 1631 static String makeLink(
1633 String path, Map<String, String> params, String innerHtml, 1632 String path, Map<String, String> params, String innerHtml,
1634 [bool hasError = false]) { 1633 [bool hasError = false]) {
1635 Uri uri = new Uri(path: path, queryParameters: params); 1634 Uri uri = new Uri(path: path, queryParameters: params);
1636 String href = HTML_ESCAPE.convert(uri.toString()); 1635 String href = HTML_ESCAPE.convert(uri.toString());
1637 String classAttribute = hasError ? ' class="error"' : ''; 1636 String classAttribute = hasError ? ' class="error"' : '';
1638 return '<a href="$href"$classAttribute>$innerHtml</a>'; 1637 return '<a href="$href"$classAttribute>$innerHtml</a>';
1639 } 1638 }
1640 } 1639 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698