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

Unified Diff: pkg/analysis_server/lib/src/search/search_domain.dart

Issue 2512633002: Add stubs for requests that currently crash Analysis Server with the new analysis driver. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/search/search_domain.dart
diff --git a/pkg/analysis_server/lib/src/search/search_domain.dart b/pkg/analysis_server/lib/src/search/search_domain.dart
index cdd39a3ca7ef3cee19364199198b93e2cae07941..b77f2df6666936008a456630839b294b20f713e0 100644
--- a/pkg/analysis_server/lib/src/search/search_domain.dart
+++ b/pkg/analysis_server/lib/src/search/search_domain.dart
@@ -49,6 +49,15 @@ class SearchDomainHandler implements protocol.RequestHandler {
searchEngine = server.searchEngine;
Future findElementReferences(protocol.Request request) async {
+ if (server.options.enableNewAnalysisDriver) {
+ // TODO(scheglov) implement for the new analysis driver
+ String searchId = (_nextSearchId++).toString();
+ var result = new protocol.SearchFindElementReferencesResult();
+ result.id = searchId;
+ _sendSearchResult(request, result);
+ _sendSearchNotification(searchId, true, <protocol.SearchResult>[]);
+ return;
+ }
var params =
new protocol.SearchFindElementReferencesParams.fromRequest(request);
await server.onAnalysisComplete;
@@ -145,6 +154,14 @@ class SearchDomainHandler implements protocol.RequestHandler {
* Implement the `search.getTypeHierarchy` request.
*/
Future getTypeHierarchy(protocol.Request request) async {
+ if (server.options.enableNewAnalysisDriver) {
+ // TODO(scheglov) implement for the new analysis driver
+ protocol.Response response =
+ new protocol.SearchGetTypeHierarchyResult(hierarchyItems: [])
+ .toResponse(request.id);
+ server.sendResponse(response);
+ return;
+ }
var params = new protocol.SearchGetTypeHierarchyParams.fromRequest(request);
String file = params.file;
// wait for analysis
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698