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

Side by Side Diff: pkg/analysis_server/lib/src/domain_analysis.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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/search/search_domain.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 domain.analysis; 5 library domain.analysis;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:core'; 8 import 'dart:core';
9 9
10 import 'package:analysis_server/plugin/analysis/analysis_domain.dart'; 10 import 'package:analysis_server/plugin/analysis/analysis_domain.dart';
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 .toResponse(request.id)); 126 .toResponse(request.id));
127 }); 127 });
128 // delay response 128 // delay response
129 return Response.DELAYED_RESPONSE; 129 return Response.DELAYED_RESPONSE;
130 } 130 }
131 131
132 /** 132 /**
133 * Implement the `analysis.getNavigation` request. 133 * Implement the `analysis.getNavigation` request.
134 */ 134 */
135 Response getNavigation(Request request) { 135 Response getNavigation(Request request) {
136 if (server.options.enableNewAnalysisDriver) {
137 // TODO(scheglov) implement for the new analysis driver
138 return new Response.getNavigationInvalidFile(request);
139 }
136 var params = new AnalysisGetNavigationParams.fromRequest(request); 140 var params = new AnalysisGetNavigationParams.fromRequest(request);
137 String file = params.file; 141 String file = params.file;
138 Future<AnalysisDoneReason> analysisFuture = 142 Future<AnalysisDoneReason> analysisFuture =
139 server.onFileAnalysisComplete(file); 143 server.onFileAnalysisComplete(file);
140 if (analysisFuture == null) { 144 if (analysisFuture == null) {
141 return new Response.getNavigationInvalidFile(request); 145 return new Response.getNavigationInvalidFile(request);
142 } 146 }
143 analysisFuture.then((AnalysisDoneReason reason) { 147 analysisFuture.then((AnalysisDoneReason reason) {
144 switch (reason) { 148 switch (reason) {
145 case AnalysisDoneReason.COMPLETE: 149 case AnalysisDoneReason.COMPLETE:
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 context.onResultChanged(descriptor).listen((result) { 414 context.onResultChanged(descriptor).listen((result) {
411 StreamController<engine.ResultChangedEvent> controller = 415 StreamController<engine.ResultChangedEvent> controller =
412 controllers[result.descriptor]; 416 controllers[result.descriptor];
413 if (controller != null) { 417 if (controller != null) {
414 controller.add(result); 418 controller.add(result);
415 } 419 }
416 }); 420 });
417 } 421 }
418 } 422 }
419 } 423 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/search/search_domain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698