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

Side by Side Diff: pkg/analysis_server/lib/src/services/refactoring/extract_method.dart

Issue 2532393008: Add libraries in corrections using SourceInfo instance of LibraryElement. (Closed)
Patch Set: Replace SourceInfo with Source. Created 4 years 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 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 final SearchEngine searchEngine; 75 final SearchEngine searchEngine;
76 final CompilationUnit unit; 76 final CompilationUnit unit;
77 final int selectionOffset; 77 final int selectionOffset;
78 final int selectionLength; 78 final int selectionLength;
79 AnalysisContext context; 79 AnalysisContext context;
80 CompilationUnitElement unitElement; 80 CompilationUnitElement unitElement;
81 LibraryElement libraryElement; 81 LibraryElement libraryElement;
82 SourceRange selectionRange; 82 SourceRange selectionRange;
83 CorrectionUtils utils; 83 CorrectionUtils utils;
84 Set<LibraryElement> librariesToImport = new Set<LibraryElement>(); 84 Set<Source> librariesToImport = new Set<Source>();
85 85
86 String returnType = ''; 86 String returnType = '';
87 String variableType; 87 String variableType;
88 String name; 88 String name;
89 bool extractAll = true; 89 bool extractAll = true;
90 bool canCreateGetter = false; 90 bool canCreateGetter = false;
91 bool createGetter = false; 91 bool createGetter = false;
92 final List<String> names = <String>[]; 92 final List<String> names = <String>[];
93 final List<int> offsets = <int>[]; 93 final List<int> offsets = <int>[];
94 final List<int> lengths = <int>[]; 94 final List<int> lengths = <int>[];
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 return false; 1242 return false;
1243 } 1243 }
1244 for (int i = 0; i < parameterTypes.length; i++) { 1244 for (int i = 0; i < parameterTypes.length; i++) {
1245 if (other.parameterTypes[i] != parameterTypes[i]) { 1245 if (other.parameterTypes[i] != parameterTypes[i]) {
1246 return false; 1246 return false;
1247 } 1247 }
1248 } 1248 }
1249 return true; 1249 return true;
1250 } 1250 }
1251 } 1251 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698