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

Side by Side Diff: pkg/analysis_server/lib/src/services/refactoring/extract_method.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 services.src.refactoring.extract_method; 5 library services.src.refactoring.extract_method;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol_server.dart' hide Element; 9 import 'package:analysis_server/src/protocol_server.dart' hide Element;
10 import 'package:analysis_server/src/services/correction/name_suggestion.dart'; 10 import 'package:analysis_server/src/services/correction/name_suggestion.dart';
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 final CompilationUnit unit; 63 final CompilationUnit unit;
64 final int selectionOffset; 64 final int selectionOffset;
65 final int selectionLength; 65 final int selectionLength;
66 AnalysisContext context; 66 AnalysisContext context;
67 CompilationUnitElement unitElement; 67 CompilationUnitElement unitElement;
68 LibraryElement libraryElement; 68 LibraryElement libraryElement;
69 SourceRange selectionRange; 69 SourceRange selectionRange;
70 CorrectionUtils utils; 70 CorrectionUtils utils;
71 Set<LibraryElement> librariesToImport = new Set<LibraryElement>(); 71 Set<LibraryElement> librariesToImport = new Set<LibraryElement>();
72 72
73 String returnType; 73 String returnType = '';
74 String variableType; 74 String variableType;
75 String name; 75 String name;
76 bool extractAll = true; 76 bool extractAll = true;
77 bool canCreateGetter = false; 77 bool canCreateGetter = false;
78 bool createGetter = false; 78 bool createGetter = false;
79 final List<String> names = <String>[]; 79 final List<String> names = <String>[];
80 final List<int> offsets = <int>[]; 80 final List<int> offsets = <int>[];
81 final List<int> lengths = <int>[]; 81 final List<int> lengths = <int>[];
82 82
83 /** 83 /**
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 return false; 1201 return false;
1202 } 1202 }
1203 for (int i = 0; i < parameterTypes.length; i++) { 1203 for (int i = 0; i < parameterTypes.length; i++) {
1204 if (other.parameterTypes[i] != parameterTypes[i]) { 1204 if (other.parameterTypes[i] != parameterTypes[i]) {
1205 return false; 1205 return false;
1206 } 1206 }
1207 } 1207 }
1208 return true; 1208 return true;
1209 } 1209 }
1210 } 1210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698