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

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

Issue 1801883002: Remove old index and search implementations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/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';
13 import 'package:analysis_server/src/services/index2/index2.dart';
14 import 'package:analyzer/file_system/physical_file_system.dart'; 12 import 'package:analyzer/file_system/physical_file_system.dart';
15 import 'package:analyzer/instrumentation/instrumentation.dart'; 13 import 'package:analyzer/instrumentation/instrumentation.dart';
16 import 'package:analyzer/plugin/embedded_resolver_provider.dart'; 14 import 'package:analyzer/plugin/embedded_resolver_provider.dart';
17 import 'package:analyzer/plugin/resolver_provider.dart'; 15 import 'package:analyzer/plugin/resolver_provider.dart';
18 import 'package:analyzer/source/pub_package_map_provider.dart'; 16 import 'package:analyzer/source/pub_package_map_provider.dart';
19 import 'package:analyzer/src/generated/sdk.dart'; 17 import 'package:analyzer/src/generated/sdk.dart';
20 import 'package:analyzer/src/generated/sdk_io.dart'; 18 import 'package:analyzer/src/generated/sdk_io.dart';
21 import 'package:plugin/plugin.dart'; 19 import 'package:plugin/plugin.dart';
22 20
23 /** 21 /**
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } else if (analysisServerOptions.fileReadMode == 'normalize-eol-always') { 79 } else if (analysisServerOptions.fileReadMode == 'normalize-eol-always') {
82 resourceProvider = new PhysicalResourceProvider( 80 resourceProvider = new PhysicalResourceProvider(
83 PhysicalResourceProvider.NORMALIZE_EOL_ALWAYS); 81 PhysicalResourceProvider.NORMALIZE_EOL_ALWAYS);
84 } else { 82 } else {
85 throw new Exception( 83 throw new Exception(
86 'File read mode was set to the unknown mode: $analysisServerOptions.fi leReadMode'); 84 'File read mode was set to the unknown mode: $analysisServerOptions.fi leReadMode');
87 } 85 }
88 86
89 Index index = null; 87 Index index = null;
90 if (!analysisServerOptions.noIndex) { 88 if (!analysisServerOptions.noIndex) {
91 index = createLocalFileIndex(); 89 index = createMemoryIndex();
92 index.contributors = serverPlugin.indexContributors;
93 index.run();
94 } 90 }
95 91
96 Index2 index2 = createMemoryIndex2();
97
98 analysisServer = new AnalysisServer( 92 analysisServer = new AnalysisServer(
99 serverChannel, 93 serverChannel,
100 resourceProvider, 94 resourceProvider,
101 new PubPackageMapProvider(resourceProvider, defaultSdk), 95 new PubPackageMapProvider(resourceProvider, defaultSdk),
102 index, 96 index,
103 index2,
104 serverPlugin, 97 serverPlugin,
105 analysisServerOptions, 98 analysisServerOptions,
106 defaultSdkCreator, 99 defaultSdkCreator,
107 instrumentationService, 100 instrumentationService,
108 packageResolverProvider: packageResolverProvider, 101 packageResolverProvider: packageResolverProvider,
109 embeddedResolverProvider: embeddedResolverProvider, 102 embeddedResolverProvider: embeddedResolverProvider,
110 rethrowExceptions: false); 103 rethrowExceptions: false);
111 analysisServer.userDefinedPlugins = userDefinedPlugins; 104 analysisServer.userDefinedPlugins = userDefinedPlugins;
112 } 105 }
113 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698