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

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

Issue 1156493004: Move index closer to the plugin API (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 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';
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 resourceProvider = new PhysicalResourceProvider( 64 resourceProvider = new PhysicalResourceProvider(
65 PhysicalResourceProvider.NORMALIZE_EOL_ALWAYS); 65 PhysicalResourceProvider.NORMALIZE_EOL_ALWAYS);
66 } else { 66 } else {
67 throw new Exception( 67 throw new Exception(
68 'File read mode was set to the unknown mode: $analysisServerOptions.fi leReadMode'); 68 'File read mode was set to the unknown mode: $analysisServerOptions.fi leReadMode');
69 } 69 }
70 70
71 Index index = null; 71 Index index = null;
72 if (!analysisServerOptions.noIndex) { 72 if (!analysisServerOptions.noIndex) {
73 index = createLocalFileIndex(); 73 index = createLocalFileIndex();
74 index.contributors = serverPlugin.indexContributors;
74 index.run(); 75 index.run();
75 } 76 }
76 77
77 analysisServer = new AnalysisServer(serverChannel, resourceProvider, 78 analysisServer = new AnalysisServer(serverChannel, resourceProvider,
78 new OptimizingPubPackageMapProvider(resourceProvider, defaultSdk), 79 new OptimizingPubPackageMapProvider(resourceProvider, defaultSdk),
79 index, serverPlugin, analysisServerOptions, defaultSdk, 80 index, serverPlugin, analysisServerOptions, defaultSdk,
80 instrumentationService, rethrowExceptions: false); 81 instrumentationService, rethrowExceptions: false);
81 analysisServer.userDefinedPlugins = userDefinedPlugins; 82 analysisServer.userDefinedPlugins = userDefinedPlugins;
82 } 83 }
83 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698