| 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/plugin/protocol/protocol.dart'; | 7 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 8 import 'package:analysis_server/src/analysis_server.dart'; | 8 import 'package:analysis_server/src/analysis_server.dart'; |
| 9 import 'package:analysis_server/src/channel/channel.dart'; | 9 import 'package:analysis_server/src/channel/channel.dart'; |
| 10 import 'package:analysis_server/src/plugin/server_plugin.dart'; | 10 import 'package:analysis_server/src/plugin/server_plugin.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/services/index2/index2.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/plugin/embedded_resolver_provider.dart'; | 16 import 'package:analyzer/plugin/embedded_resolver_provider.dart'; |
| 16 import 'package:analyzer/plugin/resolver_provider.dart'; | 17 import 'package:analyzer/plugin/resolver_provider.dart'; |
| 17 import 'package:analyzer/source/pub_package_map_provider.dart'; | 18 import 'package:analyzer/source/pub_package_map_provider.dart'; |
| 18 import 'package:analyzer/src/generated/sdk.dart'; | 19 import 'package:analyzer/src/generated/sdk.dart'; |
| 19 import 'package:analyzer/src/generated/sdk_io.dart'; | 20 import 'package:analyzer/src/generated/sdk_io.dart'; |
| 20 import 'package:plugin/plugin.dart'; | 21 import 'package:plugin/plugin.dart'; |
| 21 | 22 |
| 22 /** | 23 /** |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 'File read mode was set to the unknown mode: $analysisServerOptions.fi
leReadMode'); | 86 'File read mode was set to the unknown mode: $analysisServerOptions.fi
leReadMode'); |
| 86 } | 87 } |
| 87 | 88 |
| 88 Index index = null; | 89 Index index = null; |
| 89 if (!analysisServerOptions.noIndex) { | 90 if (!analysisServerOptions.noIndex) { |
| 90 index = createLocalFileIndex(); | 91 index = createLocalFileIndex(); |
| 91 index.contributors = serverPlugin.indexContributors; | 92 index.contributors = serverPlugin.indexContributors; |
| 92 index.run(); | 93 index.run(); |
| 93 } | 94 } |
| 94 | 95 |
| 96 Index2 index2 = createMemoryIndex2(); |
| 97 |
| 95 analysisServer = new AnalysisServer( | 98 analysisServer = new AnalysisServer( |
| 96 serverChannel, | 99 serverChannel, |
| 97 resourceProvider, | 100 resourceProvider, |
| 98 new PubPackageMapProvider(resourceProvider, defaultSdk), | 101 new PubPackageMapProvider(resourceProvider, defaultSdk), |
| 99 index, | 102 index, |
| 103 index2, |
| 100 serverPlugin, | 104 serverPlugin, |
| 101 analysisServerOptions, | 105 analysisServerOptions, |
| 102 defaultSdkCreator, | 106 defaultSdkCreator, |
| 103 instrumentationService, | 107 instrumentationService, |
| 104 packageResolverProvider: packageResolverProvider, | 108 packageResolverProvider: packageResolverProvider, |
| 105 embeddedResolverProvider: embeddedResolverProvider, | 109 embeddedResolverProvider: embeddedResolverProvider, |
| 106 rethrowExceptions: false); | 110 rethrowExceptions: false); |
| 107 analysisServer.userDefinedPlugins = userDefinedPlugins; | 111 analysisServer.userDefinedPlugins = userDefinedPlugins; |
| 108 } | 112 } |
| 109 } | 113 } |
| OLD | NEW |