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

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

Issue 1854863002: Issue 26096. Explicitly compute the result that ensures that directives are resolved in units. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix for a review comment. Created 4 years, 8 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: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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 return unit; 450 return unit;
451 } 451 }
452 unit = entry.getValue(RESOLVED_UNIT10); 452 unit = entry.getValue(RESOLVED_UNIT10);
453 if (unit != null) { 453 if (unit != null) {
454 return unit; 454 return unit;
455 } 455 }
456 unit = entry.getValue(RESOLVED_UNIT11); 456 unit = entry.getValue(RESOLVED_UNIT11);
457 if (unit != null) { 457 if (unit != null) {
458 return unit; 458 return unit;
459 } 459 }
460 unit = entry.getValue(RESOLVED_UNIT12);
461 if (unit != null) {
462 return unit;
463 }
460 return entry.getValue(RESOLVED_UNIT); 464 return entry.getValue(RESOLVED_UNIT);
461 } 465 }
462 466
463 /** 467 /**
464 * Return a list of the result descriptors whose state should be displayed for 468 * Return a list of the result descriptors whose state should be displayed for
465 * the given cache [entry]. 469 * the given cache [entry].
466 */ 470 */
467 List<ResultDescriptor> _getExpectedResults(CacheEntry entry) { 471 List<ResultDescriptor> _getExpectedResults(CacheEntry entry) {
468 AnalysisTarget target = entry.target; 472 AnalysisTarget target = entry.target;
469 Set<ResultDescriptor> results = entry.nonInvalidResults.toSet(); 473 Set<ResultDescriptor> results = entry.nonInvalidResults.toSet();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 results.add(RESOLVED_UNIT2); 523 results.add(RESOLVED_UNIT2);
520 results.add(RESOLVED_UNIT3); 524 results.add(RESOLVED_UNIT3);
521 results.add(RESOLVED_UNIT4); 525 results.add(RESOLVED_UNIT4);
522 results.add(RESOLVED_UNIT5); 526 results.add(RESOLVED_UNIT5);
523 results.add(RESOLVED_UNIT6); 527 results.add(RESOLVED_UNIT6);
524 results.add(RESOLVED_UNIT7); 528 results.add(RESOLVED_UNIT7);
525 results.add(RESOLVED_UNIT8); 529 results.add(RESOLVED_UNIT8);
526 results.add(RESOLVED_UNIT9); 530 results.add(RESOLVED_UNIT9);
527 results.add(RESOLVED_UNIT10); 531 results.add(RESOLVED_UNIT10);
528 results.add(RESOLVED_UNIT11); 532 results.add(RESOLVED_UNIT11);
533 results.add(RESOLVED_UNIT12);
529 results.add(RESOLVED_UNIT); 534 results.add(RESOLVED_UNIT);
530 results.add(STRONG_MODE_ERRORS); 535 results.add(STRONG_MODE_ERRORS);
531 results.add(USED_IMPORTED_ELEMENTS); 536 results.add(USED_IMPORTED_ELEMENTS);
532 results.add(USED_LOCAL_ELEMENTS); 537 results.add(USED_LOCAL_ELEMENTS);
533 results.add(VARIABLE_REFERENCE_ERRORS); 538 results.add(VARIABLE_REFERENCE_ERRORS);
534 results.add(VERIFY_ERRORS); 539 results.add(VERIFY_ERRORS);
535 } else if (target is ConstantEvaluationTarget) { 540 } else if (target is ConstantEvaluationTarget) {
536 results.add(CONSTANT_DEPENDENCIES); 541 results.add(CONSTANT_DEPENDENCIES);
537 results.add(CONSTANT_VALUE); 542 results.add(CONSTANT_VALUE);
538 if (target is VariableElement) { 543 if (target is VariableElement) {
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
2458 */ 2463 */
2459 static String makeLink( 2464 static String makeLink(
2460 String path, Map<String, String> params, String innerHtml, 2465 String path, Map<String, String> params, String innerHtml,
2461 [bool hasError = false]) { 2466 [bool hasError = false]) {
2462 Uri uri = new Uri(path: path, queryParameters: params); 2467 Uri uri = new Uri(path: path, queryParameters: params);
2463 String href = HTML_ESCAPE.convert(uri.toString()); 2468 String href = HTML_ESCAPE.convert(uri.toString());
2464 String classAttribute = hasError ? ' class="error"' : ''; 2469 String classAttribute = hasError ? ' class="error"' : '';
2465 return '<a href="$href"$classAttribute>$innerHtml</a>'; 2470 return '<a href="$href"$classAttribute>$innerHtml</a>';
2466 } 2471 }
2467 } 2472 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698