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

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

Issue 1083223003: Fix additional cases where analysis server might send null, violating protocol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
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 edit.domain; 5 library edit.domain;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/edit/assist/assist_core.dart'; 9 import 'package:analysis_server/edit/assist/assist_core.dart';
10 import 'package:analysis_server/edit/fix/fix_core.dart'; 10 import 'package:analysis_server/edit/fix/fix_core.dart';
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 refactoring = new ExtractLocalRefactoring(units[0], offset, length); 482 refactoring = new ExtractLocalRefactoring(units[0], offset, length);
483 feedback = new ExtractLocalVariableFeedback([], [], []); 483 feedback = new ExtractLocalVariableFeedback([], [], []);
484 } 484 }
485 } 485 }
486 if (kind == RefactoringKind.EXTRACT_METHOD) { 486 if (kind == RefactoringKind.EXTRACT_METHOD) {
487 List<CompilationUnit> units = server.getResolvedCompilationUnits(file); 487 List<CompilationUnit> units = server.getResolvedCompilationUnits(file);
488 if (units.isNotEmpty) { 488 if (units.isNotEmpty) {
489 refactoring = new ExtractMethodRefactoring( 489 refactoring = new ExtractMethodRefactoring(
490 searchEngine, units[0], offset, length); 490 searchEngine, units[0], offset, length);
491 feedback = new ExtractMethodFeedback( 491 feedback = new ExtractMethodFeedback(
492 offset, length, null, [], false, [], [], []); 492 offset, length, '', [], false, [], [], []);
493 } 493 }
494 } 494 }
495 if (kind == RefactoringKind.INLINE_LOCAL_VARIABLE) { 495 if (kind == RefactoringKind.INLINE_LOCAL_VARIABLE) {
496 List<CompilationUnit> units = server.getResolvedCompilationUnits(file); 496 List<CompilationUnit> units = server.getResolvedCompilationUnits(file);
497 if (units.isNotEmpty) { 497 if (units.isNotEmpty) {
498 refactoring = 498 refactoring =
499 new InlineLocalRefactoring(searchEngine, units[0], offset); 499 new InlineLocalRefactoring(searchEngine, units[0], offset);
500 } 500 }
501 } 501 }
502 if (kind == RefactoringKind.INLINE_METHOD) { 502 if (kind == RefactoringKind.INLINE_METHOD) {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 645 }
646 if (refactoring is RenameRefactoring) { 646 if (refactoring is RenameRefactoring) {
647 RenameRefactoring renameRefactoring = refactoring; 647 RenameRefactoring renameRefactoring = refactoring;
648 RenameOptions renameOptions = params.options; 648 RenameOptions renameOptions = params.options;
649 renameRefactoring.newName = renameOptions.newName; 649 renameRefactoring.newName = renameOptions.newName;
650 return renameRefactoring.checkNewName(); 650 return renameRefactoring.checkNewName();
651 } 651 }
652 return new RefactoringStatus(); 652 return new RefactoringStatus();
653 } 653 }
654 } 654 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698