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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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.run(); | 74 index.run(); |
75 } | 75 } |
76 | 76 |
77 analysisServer = new AnalysisServer(serverChannel, resourceProvider, | 77 analysisServer = new AnalysisServer(serverChannel, resourceProvider, |
78 new OptimizingPubPackageMapProvider(resourceProvider, defaultSdk), index
, | 78 new OptimizingPubPackageMapProvider(resourceProvider, defaultSdk), |
79 analysisServerOptions, defaultSdk, instrumentationService, | 79 index, serverPlugin, analysisServerOptions, defaultSdk, |
80 rethrowExceptions: false); | 80 instrumentationService, rethrowExceptions: false); |
81 _initializeHandlers(analysisServer); | |
82 analysisServer.userDefinedPlugins = userDefinedPlugins; | 81 analysisServer.userDefinedPlugins = userDefinedPlugins; |
83 } | 82 } |
84 | |
85 /** | |
86 * Initialize the handlers to be used by the given [server]. | |
87 */ | |
88 void _initializeHandlers(AnalysisServer server) { | |
89 server.handlers = serverPlugin.createDomains(server); | |
90 } | |
91 } | 83 } |
OLD | NEW |