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

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

Issue 1786013004: Start using the new index in Analysis Server. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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; 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' hide Resource; 9 import 'dart:core' hide Resource;
10 import 'dart:math' show max; 10 import 'dart:math' show max;
11 11
12 import 'package:analysis_server/plugin/protocol/protocol.dart' 12 import 'package:analysis_server/plugin/protocol/protocol.dart'
13 hide AnalysisOptions, Element; 13 hide AnalysisOptions, Element;
14 import 'package:analysis_server/src/analysis_logger.dart'; 14 import 'package:analysis_server/src/analysis_logger.dart';
15 import 'package:analysis_server/src/channel/channel.dart'; 15 import 'package:analysis_server/src/channel/channel.dart';
16 import 'package:analysis_server/src/context_manager.dart'; 16 import 'package:analysis_server/src/context_manager.dart';
17 import 'package:analysis_server/src/operation/operation.dart'; 17 import 'package:analysis_server/src/operation/operation.dart';
18 import 'package:analysis_server/src/operation/operation_analysis.dart'; 18 import 'package:analysis_server/src/operation/operation_analysis.dart';
19 import 'package:analysis_server/src/operation/operation_queue.dart'; 19 import 'package:analysis_server/src/operation/operation_queue.dart';
20 import 'package:analysis_server/src/plugin/server_plugin.dart'; 20 import 'package:analysis_server/src/plugin/server_plugin.dart';
21 import 'package:analysis_server/src/services/correction/namespace.dart'; 21 import 'package:analysis_server/src/services/correction/namespace.dart';
22 import 'package:analysis_server/src/services/index/index.dart'; 22 import 'package:analysis_server/src/services/index/index.dart';
23 import 'package:analysis_server/src/services/index2/index2.dart'; 23 import 'package:analysis_server/src/services/index2/index2.dart';
24 import 'package:analysis_server/src/services/search/search_engine.dart'; 24 import 'package:analysis_server/src/services/search/search_engine.dart';
25 import 'package:analysis_server/src/services/search/search_engine_internal2.dart ';
25 import 'package:analyzer/dart/element/element.dart'; 26 import 'package:analyzer/dart/element/element.dart';
26 import 'package:analyzer/file_system/file_system.dart'; 27 import 'package:analyzer/file_system/file_system.dart';
27 import 'package:analyzer/instrumentation/instrumentation.dart'; 28 import 'package:analyzer/instrumentation/instrumentation.dart';
28 import 'package:analyzer/plugin/embedded_resolver_provider.dart'; 29 import 'package:analyzer/plugin/embedded_resolver_provider.dart';
29 import 'package:analyzer/plugin/resolver_provider.dart'; 30 import 'package:analyzer/plugin/resolver_provider.dart';
30 import 'package:analyzer/source/embedder.dart'; 31 import 'package:analyzer/source/embedder.dart';
31 import 'package:analyzer/source/pub_package_map_provider.dart'; 32 import 'package:analyzer/source/pub_package_map_provider.dart';
32 import 'package:analyzer/src/generated/ast.dart'; 33 import 'package:analyzer/src/generated/ast.dart';
33 import 'package:analyzer/src/generated/engine.dart'; 34 import 'package:analyzer/src/generated/engine.dart';
34 import 'package:analyzer/src/generated/java_engine.dart'; 35 import 'package:analyzer/src/generated/java_engine.dart';
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 Index2 _index2, 316 Index2 _index2,
316 this.serverPlugin, 317 this.serverPlugin,
317 this.options, 318 this.options,
318 this.defaultSdkCreator, 319 this.defaultSdkCreator,
319 this.instrumentationService, 320 this.instrumentationService,
320 {ResolverProvider packageResolverProvider: null, 321 {ResolverProvider packageResolverProvider: null,
321 EmbeddedResolverProvider embeddedResolverProvider: null, 322 EmbeddedResolverProvider embeddedResolverProvider: null,
322 this.rethrowExceptions: true}) 323 this.rethrowExceptions: true})
323 : index = _index, 324 : index = _index,
324 index2 = _index2, 325 index2 = _index2,
325 searchEngine = _index != null ? createSearchEngine(_index) : null { 326 searchEngine = _index != null ? new SearchEngineImpl2(_index2) : null {
326 _performance = performanceDuringStartup; 327 _performance = performanceDuringStartup;
327 defaultContextOptions.incremental = true; 328 defaultContextOptions.incremental = true;
328 defaultContextOptions.incrementalApi = 329 defaultContextOptions.incrementalApi =
329 options.enableIncrementalResolutionApi; 330 options.enableIncrementalResolutionApi;
330 defaultContextOptions.incrementalValidation = 331 defaultContextOptions.incrementalValidation =
331 options.enableIncrementalResolutionValidation; 332 options.enableIncrementalResolutionValidation;
332 defaultContextOptions.generateImplicitErrors = false; 333 defaultContextOptions.generateImplicitErrors = false;
333 operationQueue = new ServerOperationQueue(); 334 operationQueue = new ServerOperationQueue();
334 sdkManager = new DartSdkManager(defaultSdkCreator); 335 sdkManager = new DartSdkManager(defaultSdkCreator);
335 contextManager = new ContextManagerImpl( 336 contextManager = new ContextManagerImpl(
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 /** 1752 /**
1752 * The [PerformanceTag] for time spent in server request handlers. 1753 * The [PerformanceTag] for time spent in server request handlers.
1753 */ 1754 */
1754 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 1755 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
1755 1756
1756 /** 1757 /**
1757 * The [PerformanceTag] for time spent in split store microtasks. 1758 * The [PerformanceTag] for time spent in split store microtasks.
1758 */ 1759 */
1759 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1760 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1760 } 1761 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698