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

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

Issue 2945313002: Remove the unused class SingleContextManager (Closed)
Patch Set: Created 3 years, 6 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/analysis_server/lib/src/server/driver.dart » ('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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:core'; 7 import 'dart:core';
8 import 'dart:io' as io; 8 import 'dart:io' as io;
9 import 'dart:math' show max; 9 import 'dart:math' show max;
10 10
(...skipping 18 matching lines...) Expand all
29 import 'package:analysis_server/src/plugin/notification_manager.dart'; 29 import 'package:analysis_server/src/plugin/notification_manager.dart';
30 import 'package:analysis_server/src/plugin/plugin_manager.dart'; 30 import 'package:analysis_server/src/plugin/plugin_manager.dart';
31 import 'package:analysis_server/src/plugin/plugin_watcher.dart'; 31 import 'package:analysis_server/src/plugin/plugin_watcher.dart';
32 import 'package:analysis_server/src/plugin/server_plugin.dart'; 32 import 'package:analysis_server/src/plugin/server_plugin.dart';
33 import 'package:analysis_server/src/protocol_server.dart' as server; 33 import 'package:analysis_server/src/protocol_server.dart' as server;
34 import 'package:analysis_server/src/server/diagnostic_server.dart'; 34 import 'package:analysis_server/src/server/diagnostic_server.dart';
35 import 'package:analysis_server/src/services/correction/namespace.dart'; 35 import 'package:analysis_server/src/services/correction/namespace.dart';
36 import 'package:analysis_server/src/services/index/index.dart'; 36 import 'package:analysis_server/src/services/index/index.dart';
37 import 'package:analysis_server/src/services/search/search_engine.dart'; 37 import 'package:analysis_server/src/services/search/search_engine.dart';
38 import 'package:analysis_server/src/services/search/search_engine_internal2.dart '; 38 import 'package:analysis_server/src/services/search/search_engine_internal2.dart ';
39 import 'package:analysis_server/src/single_context_manager.dart';
40 import 'package:analysis_server/src/utilities/null_string_sink.dart'; 39 import 'package:analysis_server/src/utilities/null_string_sink.dart';
41 import 'package:analyzer/context/context_root.dart'; 40 import 'package:analyzer/context/context_root.dart';
42 import 'package:analyzer/dart/ast/ast.dart'; 41 import 'package:analyzer/dart/ast/ast.dart';
43 import 'package:analyzer/dart/element/element.dart'; 42 import 'package:analyzer/dart/element/element.dart';
44 import 'package:analyzer/exception/exception.dart'; 43 import 'package:analyzer/exception/exception.dart';
45 import 'package:analyzer/file_system/file_system.dart'; 44 import 'package:analyzer/file_system/file_system.dart';
46 import 'package:analyzer/file_system/physical_file_system.dart'; 45 import 'package:analyzer/file_system/physical_file_system.dart';
47 import 'package:analyzer/instrumentation/instrumentation.dart'; 46 import 'package:analyzer/instrumentation/instrumentation.dart';
48 import 'package:analyzer/plugin/resolver_provider.dart'; 47 import 'package:analyzer/plugin/resolver_provider.dart';
49 import 'package:analyzer/source/pub_package_map_provider.dart'; 48 import 'package:analyzer/source/pub_package_map_provider.dart';
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 this.resourceProvider, 397 this.resourceProvider,
399 PubPackageMapProvider packageMapProvider, 398 PubPackageMapProvider packageMapProvider,
400 this.index, 399 this.index,
401 this.serverPlugin, 400 this.serverPlugin,
402 this.options, 401 this.options,
403 this.sdkManager, 402 this.sdkManager,
404 this.instrumentationService, 403 this.instrumentationService,
405 {this.diagnosticServer, 404 {this.diagnosticServer,
406 ResolverProvider fileResolverProvider: null, 405 ResolverProvider fileResolverProvider: null,
407 ResolverProvider packageResolverProvider: null, 406 ResolverProvider packageResolverProvider: null,
408 bool useSingleContextManager: false,
409 this.rethrowExceptions: true}) 407 this.rethrowExceptions: true})
410 : notificationManager = 408 : notificationManager =
411 new NotificationManager(channel, resourceProvider) { 409 new NotificationManager(channel, resourceProvider) {
412 _performance = performanceDuringStartup; 410 _performance = performanceDuringStartup;
413 411
414 pluginManager = new PluginManager( 412 pluginManager = new PluginManager(
415 resourceProvider, 413 resourceProvider,
416 _getByteStorePath(), 414 _getByteStorePath(),
417 sdkManager.defaultSdkDirectory, 415 sdkManager.defaultSdkDirectory,
418 notificationManager, 416 notificationManager,
(...skipping 22 matching lines...) Expand all
441 } 439 }
442 _analysisPerformanceLogger = new PerformanceLog(sink); 440 _analysisPerformanceLogger = new PerformanceLog(sink);
443 } 441 }
444 byteStore = _createByteStore(); 442 byteStore = _createByteStore();
445 analysisDriverScheduler = new nd.AnalysisDriverScheduler( 443 analysisDriverScheduler = new nd.AnalysisDriverScheduler(
446 _analysisPerformanceLogger, 444 _analysisPerformanceLogger,
447 driverWatcher: pluginWatcher); 445 driverWatcher: pluginWatcher);
448 analysisDriverScheduler.status.listen(sendStatusNotificationNew); 446 analysisDriverScheduler.status.listen(sendStatusNotificationNew);
449 analysisDriverScheduler.start(); 447 analysisDriverScheduler.start();
450 448
451 if (useSingleContextManager) { 449 contextManager = new ContextManagerImpl(
452 contextManager = new SingleContextManager(resourceProvider, sdkManager, 450 resourceProvider,
453 packageResolverProvider, analyzedFilesGlobs, defaultContextOptions); 451 sdkManager,
454 } else { 452 packageResolverProvider,
455 contextManager = new ContextManagerImpl( 453 packageMapProvider,
456 resourceProvider, 454 analyzedFilesGlobs,
457 sdkManager, 455 instrumentationService,
458 packageResolverProvider, 456 defaultContextOptions);
459 packageMapProvider,
460 analyzedFilesGlobs,
461 instrumentationService,
462 defaultContextOptions);
463 }
464 this.fileResolverProvider = fileResolverProvider; 457 this.fileResolverProvider = fileResolverProvider;
465 this.packageResolverProvider = packageResolverProvider; 458 this.packageResolverProvider = packageResolverProvider;
466 ServerContextManagerCallbacks contextManagerCallbacks = 459 ServerContextManagerCallbacks contextManagerCallbacks =
467 new ServerContextManagerCallbacks(this, resourceProvider); 460 new ServerContextManagerCallbacks(this, resourceProvider);
468 contextManager.callbacks = contextManagerCallbacks; 461 contextManager.callbacks = contextManagerCallbacks;
469 AnalysisEngine.instance.logger = new AnalysisLogger(this); 462 AnalysisEngine.instance.logger = new AnalysisLogger(this);
470 _onAnalysisStartedController = new StreamController.broadcast(); 463 _onAnalysisStartedController = new StreamController.broadcast();
471 _onFileAnalyzedController = new StreamController.broadcast(); 464 _onFileAnalyzedController = new StreamController.broadcast();
472 // temporary plugin support: 465 // temporary plugin support:
473 _onFileAddedController = new StreamController.broadcast(); 466 _onFileAddedController = new StreamController.broadcast();
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 /** 1870 /**
1878 * The [PerformanceTag] for time spent in server request handlers. 1871 * The [PerformanceTag] for time spent in server request handlers.
1879 */ 1872 */
1880 static PerformanceTag serverRequests = server.createChild('requests'); 1873 static PerformanceTag serverRequests = server.createChild('requests');
1881 1874
1882 /** 1875 /**
1883 * The [PerformanceTag] for time spent in split store microtasks. 1876 * The [PerformanceTag] for time spent in split store microtasks.
1884 */ 1877 */
1885 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1878 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1886 } 1879 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/server/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698