OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |