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

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

Issue 2229603003: Extract unresolved AST parsing (PARSED_UNIT1) from full parsing, which includes UriBasedDirective(s… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update task graph. Created 4 years, 4 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
« no previous file with comments | « no previous file | pkg/analyzer/doc/tasks.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 Folder _findFolder(AnalysisServer analysisServer, String contextFilter) { 428 Folder _findFolder(AnalysisServer analysisServer, String contextFilter) {
429 return analysisServer.folderMap.keys.firstWhere( 429 return analysisServer.folderMap.keys.firstWhere(
430 (Folder folder) => folder.path == contextFilter, 430 (Folder folder) => folder.path == contextFilter,
431 orElse: () => null); 431 orElse: () => null);
432 } 432 }
433 433
434 /** 434 /**
435 * Return any AST structure stored in the given [entry]. 435 * Return any AST structure stored in the given [entry].
436 */ 436 */
437 CompilationUnit _getAnyAst(CacheEntry entry) { 437 CompilationUnit _getAnyAst(CacheEntry entry) {
438 CompilationUnit unit = entry.getValue(PARSED_UNIT); 438 CompilationUnit unit = entry.getValue(PARSED_UNIT1);
439 if (unit != null) { 439 if (unit != null) {
440 return unit; 440 return unit;
441 } 441 }
442 unit = entry.getValue(PARSED_UNIT);
443 if (unit != null) {
444 return unit;
445 }
442 unit = entry.getValue(RESOLVED_UNIT1); 446 unit = entry.getValue(RESOLVED_UNIT1);
443 if (unit != null) { 447 if (unit != null) {
444 return unit; 448 return unit;
445 } 449 }
446 unit = entry.getValue(RESOLVED_UNIT2); 450 unit = entry.getValue(RESOLVED_UNIT2);
447 if (unit != null) { 451 if (unit != null) {
448 return unit; 452 return unit;
449 } 453 }
450 unit = entry.getValue(RESOLVED_UNIT3); 454 unit = entry.getValue(RESOLVED_UNIT3);
451 if (unit != null) { 455 if (unit != null) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 results.add(IS_LAUNCHABLE); 523 results.add(IS_LAUNCHABLE);
520 results.add(LIBRARY_ELEMENT1); 524 results.add(LIBRARY_ELEMENT1);
521 results.add(LIBRARY_ELEMENT2); 525 results.add(LIBRARY_ELEMENT2);
522 results.add(LIBRARY_ELEMENT3); 526 results.add(LIBRARY_ELEMENT3);
523 results.add(LIBRARY_ELEMENT4); 527 results.add(LIBRARY_ELEMENT4);
524 results.add(LIBRARY_ELEMENT5); 528 results.add(LIBRARY_ELEMENT5);
525 results.add(LIBRARY_ELEMENT6); 529 results.add(LIBRARY_ELEMENT6);
526 results.add(LIBRARY_ELEMENT); 530 results.add(LIBRARY_ELEMENT);
527 results.add(LIBRARY_ERRORS_READY); 531 results.add(LIBRARY_ERRORS_READY);
528 results.add(PARSE_ERRORS); 532 results.add(PARSE_ERRORS);
533 results.add(PARSED_UNIT1);
529 results.add(PARSED_UNIT); 534 results.add(PARSED_UNIT);
530 results.add(REFERENCED_NAMES); 535 results.add(REFERENCED_NAMES);
531 results.add(SCAN_ERRORS); 536 results.add(SCAN_ERRORS);
532 results.add(SOURCE_KIND); 537 results.add(SOURCE_KIND);
533 results.add(TOKEN_STREAM); 538 results.add(TOKEN_STREAM);
534 results.add(UNITS); 539 results.add(UNITS);
535 } else if (AnalysisEngine.isHtmlFileName(name)) { 540 } else if (AnalysisEngine.isHtmlFileName(name)) {
536 results.add(DART_SCRIPTS); 541 results.add(DART_SCRIPTS);
537 results.add(HTML_DOCUMENT); 542 results.add(HTML_DOCUMENT);
538 results.add(HTML_DOCUMENT_ERRORS); 543 results.add(HTML_DOCUMENT_ERRORS);
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2743 */ 2748 */
2744 static String makeLink( 2749 static String makeLink(
2745 String path, Map<String, String> params, String innerHtml, 2750 String path, Map<String, String> params, String innerHtml,
2746 [bool hasError = false]) { 2751 [bool hasError = false]) {
2747 Uri uri = new Uri(path: path, queryParameters: params); 2752 Uri uri = new Uri(path: path, queryParameters: params);
2748 String href = HTML_ESCAPE.convert(uri.toString()); 2753 String href = HTML_ESCAPE.convert(uri.toString());
2749 String classAttribute = hasError ? ' class="error"' : ''; 2754 String classAttribute = hasError ? ' class="error"' : '';
2750 return '<a href="$href"$classAttribute>$innerHtml</a>'; 2755 return '<a href="$href"$classAttribute>$innerHtml</a>';
2751 } 2756 }
2752 } 2757 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/doc/tasks.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698