OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |