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

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

Issue 1764553002: Make SearchMatch usable for the new index - remove the element field. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 library services.src.refactoring.rename_constructor; 5 library services.src.refactoring.rename_constructor;
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/source_range.dart'; 10 import 'package:analysis_server/src/services/correction/source_range.dart';
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 } 80 }
81 81
82 SourceReference _createDeclarationReference() { 82 SourceReference _createDeclarationReference() {
83 SourceRange sourceRange; 83 SourceRange sourceRange;
84 if (element.periodOffset != null) { 84 if (element.periodOffset != null) {
85 sourceRange = rangeStartEnd(element.periodOffset, element.nameEnd); 85 sourceRange = rangeStartEnd(element.periodOffset, element.nameEnd);
86 } else { 86 } else {
87 sourceRange = rangeStartLength(element.nameEnd, 0); 87 sourceRange = rangeStartLength(element.nameEnd, 0);
88 } 88 }
89 String file = element.source.fullName; 89 return new SourceReference(new SearchMatch(
90 return new SourceReference(file, sourceRange, element, true, true); 90 element.context,
91 element.library.source.uri.toString(),
92 element.source.uri.toString(),
93 MatchKind.DECLARATION,
94 sourceRange,
95 true,
96 true));
91 } 97 }
92 } 98 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698