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

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

Issue 1243893002: Separate the API's used by ContextManager. (Closed) Base URL: git@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.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
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 = analysisServer.contextManager.defaultOptions; 1013 AnalysisOptionsImpl options =
1014 (analysisServer.contextManager.callbacks as ServerContextManagerCallback s).defaultOptions;
1014 ServerOperationQueue operationQueue = analysisServer.operationQueue; 1015 ServerOperationQueue operationQueue = analysisServer.operationQueue;
1015 1016
1016 buffer.write('<h3>Analysis Domain</h3>'); 1017 buffer.write('<h3>Analysis Domain</h3>');
1017 _writeTwoColumns(buffer, (StringBuffer buffer) { 1018 _writeTwoColumns(buffer, (StringBuffer buffer) {
1018 if (operationQueue.isEmpty) { 1019 if (operationQueue.isEmpty) {
1019 buffer.write('<p>Status: Done analyzing</p>'); 1020 buffer.write('<p>Status: Done analyzing</p>');
1020 } else { 1021 } else {
1021 ServerOperation operation = operationQueue.peek(); 1022 ServerOperation operation = operationQueue.peek();
1022 if (operation is PerformAnalysisOperation) { 1023 if (operation is PerformAnalysisOperation) {
1023 Folder folder = _keyForValue(folderMap, operation.context); 1024 Folder folder = _keyForValue(folderMap, operation.context);
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 */ 1626 */
1626 static String makeLink( 1627 static String makeLink(
1627 String path, Map<String, String> params, String innerHtml, 1628 String path, Map<String, String> params, String innerHtml,
1628 [bool hasError = false]) { 1629 [bool hasError = false]) {
1629 Uri uri = new Uri(path: path, queryParameters: params); 1630 Uri uri = new Uri(path: path, queryParameters: params);
1630 String href = HTML_ESCAPE.convert(uri.toString()); 1631 String href = HTML_ESCAPE.convert(uri.toString());
1631 String classAttribute = hasError ? ' class="error"' : ''; 1632 String classAttribute = hasError ? ' class="error"' : '';
1632 return '<a href="$href"$classAttribute>$innerHtml</a>'; 1633 return '<a href="$href"$classAttribute>$innerHtml</a>';
1633 } 1634 }
1634 } 1635 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698