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

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

Issue 941883002: cache pub list results (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/source/caching_pub_package_map_provider.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 library socket.server; 5 library socket.server;
6 6
7 import 'package:analysis_server/src/analysis_server.dart'; 7 import 'package:analysis_server/src/analysis_server.dart';
8 import 'package:analysis_server/src/channel/channel.dart'; 8 import 'package:analysis_server/src/channel/channel.dart';
9 import 'package:analysis_server/src/plugin/server_plugin.dart'; 9 import 'package:analysis_server/src/plugin/server_plugin.dart';
10 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
11 import 'package:analysis_server/src/services/index/index.dart'; 11 import 'package:analysis_server/src/services/index/index.dart';
12 import 'package:analysis_server/src/services/index/local_file_index.dart'; 12 import 'package:analysis_server/src/services/index/local_file_index.dart';
13 import 'package:analysis_server/src/source/caching_pub_package_map_provider.dart ';
13 import 'package:analyzer/file_system/physical_file_system.dart'; 14 import 'package:analyzer/file_system/physical_file_system.dart';
14 import 'package:analyzer/instrumentation/instrumentation.dart'; 15 import 'package:analyzer/instrumentation/instrumentation.dart';
15 import 'package:analyzer/source/pub_package_map_provider.dart'; 16 import 'package:analyzer/source/pub_package_map_provider.dart';
16 import 'package:analyzer/src/generated/sdk_io.dart'; 17 import 'package:analyzer/src/generated/sdk_io.dart';
17 18
18 19
19 /** 20 /**
20 * Instances of the class [SocketServer] implement the common parts of 21 * Instances of the class [SocketServer] implement the common parts of
21 * http-based and stdio-based analysis servers. The primary responsibility of 22 * http-based and stdio-based analysis servers. The primary responsibility of
22 * the SocketServer is to manage the lifetime of the AnalysisServer and to 23 * the SocketServer is to manage the lifetime of the AnalysisServer and to
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 67
67 Index index = null; 68 Index index = null;
68 if (!analysisServerOptions.noIndex) { 69 if (!analysisServerOptions.noIndex) {
69 index = createLocalFileIndex(); 70 index = createLocalFileIndex();
70 index.run(); 71 index.run();
71 } 72 }
72 73
73 analysisServer = new AnalysisServer( 74 analysisServer = new AnalysisServer(
74 serverChannel, 75 serverChannel,
75 resourceProvider, 76 resourceProvider,
76 new PubPackageMapProvider(resourceProvider, defaultSdk), 77 new CachingPubPackageMapProvider(resourceProvider, defaultSdk),
77 index, 78 index,
78 analysisServerOptions, 79 analysisServerOptions,
79 defaultSdk, 80 defaultSdk,
80 instrumentationService, 81 instrumentationService,
81 rethrowExceptions: false); 82 rethrowExceptions: false);
82 _initializeHandlers(analysisServer); 83 _initializeHandlers(analysisServer);
83 } 84 }
84 85
85 /** 86 /**
86 * Initialize the handlers to be used by the given [server]. 87 * Initialize the handlers to be used by the given [server].
87 */ 88 */
88 void _initializeHandlers(AnalysisServer server) { 89 void _initializeHandlers(AnalysisServer server) {
89 server.handlers = serverPlugin.createDomains(server); 90 server.handlers = serverPlugin.createDomains(server);
90 } 91 }
91 } 92 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/source/caching_pub_package_map_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698