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

Side by Side Diff: pkg/analysis_server/lib/src/edit/edit_domain.dart

Issue 3001723002: Update edit.importElements response data to support part files (Closed)
Patch Set: Created 3 years, 4 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analysis_server/plugin/edit/assist/assist_core.dart'; 7 import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
8 import 'package:analysis_server/plugin/edit/assist/assist_dart.dart'; 8 import 'package:analysis_server/plugin/edit/assist/assist_dart.dart';
9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; 9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
10 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart'; 10 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart';
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 399 }
400 // 400 //
401 // Compute the edits required to import the required elements. 401 // Compute the edits required to import the required elements.
402 // 402 //
403 ImportElementsComputer computer = 403 ImportElementsComputer computer =
404 new ImportElementsComputer(server.resourceProvider, result); 404 new ImportElementsComputer(server.resourceProvider, result);
405 SourceChange change = await computer.createEdits(params.elements); 405 SourceChange change = await computer.createEdits(params.elements);
406 // 406 //
407 // Send the response. 407 // Send the response.
408 // 408 //
409 server.sendResponse(new EditImportElementsResult(change.edits[0].edits) 409 server.sendResponse(
410 .toResponse(request.id)); 410 new EditImportElementsResult(change.edits[0]).toResponse(request.id));
411 } 411 }
412 412
413 Future isPostfixCompletionApplicable(Request request) async { 413 Future isPostfixCompletionApplicable(Request request) async {
414 var params = new EditGetPostfixCompletionParams.fromRequest(request); 414 var params = new EditGetPostfixCompletionParams.fromRequest(request);
415 bool value = false; 415 bool value = false;
416 416
417 AnalysisResult result = await server.getAnalysisResult(params.file); 417 AnalysisResult result = await server.getAnalysisResult(params.file);
418 if (result != null) { 418 if (result != null) {
419 CompilationUnit unit = result.unit; 419 CompilationUnit unit = result.unit;
420 CompilationUnitElement unitElement = 420 CompilationUnitElement unitElement =
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 } 1058 }
1059 return new RefactoringStatus(); 1059 return new RefactoringStatus();
1060 } 1060 }
1061 } 1061 }
1062 1062
1063 /** 1063 /**
1064 * [_RefactoringManager] throws instances of this class internally to stop 1064 * [_RefactoringManager] throws instances of this class internally to stop
1065 * processing in a manager that was reset. 1065 * processing in a manager that was reset.
1066 */ 1066 */
1067 class _ResetError {} 1067 class _ResetError {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698