| 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.status.get_handler; | 5 library analysis_server.src.status.get_handler; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 import 'dart:math'; | 10 import 'dart:math'; |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 _returnUnknownRequest(request); | 414 _returnUnknownRequest(request); |
| 415 } | 415 } |
| 416 } | 416 } |
| 417 | 417 |
| 418 /** | 418 /** |
| 419 * Produce an encoded version of the given [descriptor] that can be used to | 419 * Produce an encoded version of the given [descriptor] that can be used to |
| 420 * find the descriptor later. | 420 * find the descriptor later. |
| 421 */ | 421 */ |
| 422 String _encodeSdkDescriptor(SdkDescription descriptor) { | 422 String _encodeSdkDescriptor(SdkDescription descriptor) { |
| 423 StringBuffer buffer = new StringBuffer(); | 423 StringBuffer buffer = new StringBuffer(); |
| 424 buffer.write(descriptor.options.encodeCrossContextOptions().join(',')); | 424 buffer.write(descriptor.options.signature.join(',')); |
| 425 for (String path in descriptor.paths) { | 425 for (String path in descriptor.paths) { |
| 426 buffer.write('+'); | 426 buffer.write('+'); |
| 427 buffer.write(path); | 427 buffer.write(path); |
| 428 } | 428 } |
| 429 return buffer.toString(); | 429 return buffer.toString(); |
| 430 } | 430 } |
| 431 | 431 |
| 432 /** | 432 /** |
| 433 * Return the folder being managed by the given [analysisServer] that matches | 433 * Return the folder being managed by the given [analysisServer] that matches |
| 434 * the given [contextFilter], or `null` if there is none. | 434 * the given [contextFilter], or `null` if there is none. |
| (...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2744 */ | 2744 */ |
| 2745 static String makeLink( | 2745 static String makeLink( |
| 2746 String path, Map<String, String> params, String innerHtml, | 2746 String path, Map<String, String> params, String innerHtml, |
| 2747 [bool hasError = false]) { | 2747 [bool hasError = false]) { |
| 2748 Uri uri = new Uri(path: path, queryParameters: params); | 2748 Uri uri = new Uri(path: path, queryParameters: params); |
| 2749 String href = HTML_ESCAPE.convert(uri.toString()); | 2749 String href = HTML_ESCAPE.convert(uri.toString()); |
| 2750 String classAttribute = hasError ? ' class="error"' : ''; | 2750 String classAttribute = hasError ? ' class="error"' : ''; |
| 2751 return '<a href="$href"$classAttribute>$innerHtml</a>'; | 2751 return '<a href="$href"$classAttribute>$innerHtml</a>'; |
| 2752 } | 2752 } |
| 2753 } | 2753 } |
| OLD | NEW |