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

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

Issue 2551023005: Prepare for decoupling analyzer ASTs from element model. (Closed)
Patch Set: Address review comments Created 4 years 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; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:core'; 9 import 'dart:core';
10 import 'dart:io' as io; 10 import 'dart:io' as io;
11 import 'dart:math' show max; 11 import 'dart:math' show max;
12 12
13 import 'package:analysis_server/plugin/protocol/protocol.dart' 13 import 'package:analysis_server/plugin/protocol/protocol.dart'
14 hide AnalysisOptions, Element; 14 hide AnalysisOptions, Element;
15 import 'package:analysis_server/src/analysis_logger.dart'; 15 import 'package:analysis_server/src/analysis_logger.dart';
16 import 'package:analysis_server/src/channel/channel.dart'; 16 import 'package:analysis_server/src/channel/channel.dart';
17 import 'package:analysis_server/src/computer/new_notifications.dart'; 17 import 'package:analysis_server/src/computer/new_notifications.dart';
18 import 'package:analysis_server/src/context_manager.dart'; 18 import 'package:analysis_server/src/context_manager.dart';
19 import 'package:analysis_server/src/operation/operation.dart'; 19 import 'package:analysis_server/src/operation/operation.dart';
20 import 'package:analysis_server/src/operation/operation_analysis.dart'; 20 import 'package:analysis_server/src/operation/operation_analysis.dart';
21 import 'package:analysis_server/src/operation/operation_queue.dart'; 21 import 'package:analysis_server/src/operation/operation_queue.dart';
22 import 'package:analysis_server/src/plugin/server_plugin.dart'; 22 import 'package:analysis_server/src/plugin/server_plugin.dart';
23 import 'package:analysis_server/src/services/correction/namespace.dart'; 23 import 'package:analysis_server/src/services/correction/namespace.dart';
24 import 'package:analysis_server/src/services/index/index.dart'; 24 import 'package:analysis_server/src/services/index/index.dart';
25 import 'package:analysis_server/src/services/search/search_engine.dart'; 25 import 'package:analysis_server/src/services/search/search_engine.dart';
26 import 'package:analysis_server/src/services/search/search_engine_internal.dart' ; 26 import 'package:analysis_server/src/services/search/search_engine_internal.dart' ;
27 import 'package:analysis_server/src/services/search/search_engine_internal2.dart '; 27 import 'package:analysis_server/src/services/search/search_engine_internal2.dart ';
28 import 'package:analysis_server/src/single_context_manager.dart'; 28 import 'package:analysis_server/src/single_context_manager.dart';
29 import 'package:analyzer/dart/ast/ast.dart'; 29 import 'package:analyzer/dart/ast/ast.dart';
30 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
30 import 'package:analyzer/dart/element/element.dart'; 31 import 'package:analyzer/dart/element/element.dart';
31 import 'package:analyzer/exception/exception.dart'; 32 import 'package:analyzer/exception/exception.dart';
32 import 'package:analyzer/file_system/file_system.dart'; 33 import 'package:analyzer/file_system/file_system.dart';
33 import 'package:analyzer/file_system/physical_file_system.dart'; 34 import 'package:analyzer/file_system/physical_file_system.dart';
34 import 'package:analyzer/instrumentation/instrumentation.dart'; 35 import 'package:analyzer/instrumentation/instrumentation.dart';
35 import 'package:analyzer/plugin/resolver_provider.dart'; 36 import 'package:analyzer/plugin/resolver_provider.dart';
36 import 'package:analyzer/source/pub_package_map_provider.dart'; 37 import 'package:analyzer/source/pub_package_map_provider.dart';
37 import 'package:analyzer/src/context/builder.dart'; 38 import 'package:analyzer/src/context/builder.dart';
38 import 'package:analyzer/src/dart/analysis/byte_store.dart'; 39 import 'package:analyzer/src/dart/analysis/byte_store.dart';
39 import 'package:analyzer/src/dart/analysis/driver.dart' as nd; 40 import 'package:analyzer/src/dart/analysis/driver.dart' as nd;
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 // specific. OTOH as it is planned now Angular results are not 1263 // specific. OTOH as it is planned now Angular results are not
1263 // flushable. 1264 // flushable.
1264 CompilationUnit dartUnit = 1265 CompilationUnit dartUnit =
1265 _getResolvedCompilationUnitToResendNotification(context, source); 1266 _getResolvedCompilationUnitToResendNotification(context, source);
1266 if (dartUnit != null) { 1267 if (dartUnit != null) {
1267 switch (service) { 1268 switch (service) {
1268 case AnalysisService.HIGHLIGHTS: 1269 case AnalysisService.HIGHLIGHTS:
1269 sendAnalysisNotificationHighlights(this, file, dartUnit); 1270 sendAnalysisNotificationHighlights(this, file, dartUnit);
1270 break; 1271 break;
1271 case AnalysisService.OUTLINE: 1272 case AnalysisService.OUTLINE:
1272 AnalysisContext context = dartUnit.element.context; 1273 AnalysisContext context =
1274 resolutionMap.elementForCompilationUnit(dartUnit).context;
1273 LineInfo lineInfo = context.getLineInfo(source); 1275 LineInfo lineInfo = context.getLineInfo(source);
1274 SourceKind kind = context.getKindOf(source); 1276 SourceKind kind = context.getKindOf(source);
1275 sendAnalysisNotificationOutline( 1277 sendAnalysisNotificationOutline(
1276 this, file, lineInfo, kind, dartUnit); 1278 this, file, lineInfo, kind, dartUnit);
1277 break; 1279 break;
1278 case AnalysisService.OVERRIDES: 1280 case AnalysisService.OVERRIDES:
1279 sendAnalysisNotificationOverrides(this, file, dartUnit); 1281 sendAnalysisNotificationOverrides(this, file, dartUnit);
1280 break; 1282 break;
1281 } 1283 }
1282 } 1284 }
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 */ 2101 */
2100 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 2102 static PerformanceTag splitStore = new PerformanceTag('splitStore');
2101 } 2103 }
2102 2104
2103 class _NullStringSink implements StringSink { 2105 class _NullStringSink implements StringSink {
2104 void write(Object obj) {} 2106 void write(Object obj) {}
2105 void writeAll(Iterable objects, [String separator = ""]) {} 2107 void writeAll(Iterable objects, [String separator = ""]) {}
2106 void writeCharCode(int charCode) {} 2108 void writeCharCode(int charCode) {}
2107 void writeln([Object obj = ""]) {} 2109 void writeln([Object obj = ""]) {}
2108 } 2110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698