File tree Expand file tree Collapse file tree 6 files changed +4
-31
lines changed
analysis_server/lib/src/services/refactoring/legacy Expand file tree Collapse file tree 6 files changed +4
-31
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,6 @@ class RenameProcessor {
3030 this .newName,
3131 );
3232
33- /// Add the edit that updates the [element] declaration.
34- void addDeclarationEdit (Element ? element) {
35- if (element != null && workspace.containsElement (element)) {
36- var edit = newSourceEdit_range (range.elementName (element), newName);
37- doSourceChange_addElementEdit (change, element, edit);
38- }
39- }
40-
4133 /// Add the edit that updates the [element] declaration.
4234 void addDeclarationEdit2 (Element2 ? element) {
4335 if (element == null ) {
@@ -72,14 +64,6 @@ class RenameProcessor {
7264 }
7365 }
7466
75- /// Update the [element] declaration and reference to it.
76- Future <void > renameElement (Element element) {
77- addDeclarationEdit (element);
78- return workspace.searchEngine
79- .searchReferences (element.asElement2! )
80- .then (addReferenceEdits);
81- }
82-
8367 /// Update the [element] declaration and references to it.
8468 Future <void > renameElement2 (Element2 element) async {
8569 addDeclarationEdit2 (element);
Original file line number Diff line number Diff line change 1+ ## 0.13.0-dev
2+ - Remove ` elementName() ` from ` RangeFactory ` . Use ` fragmentName() ` instead.
3+
14## 0.12.0
25- Breaking changes to ` DartFileEditBuilder ` : ` convertFunctionFromSyncToAsync `
36 and ` replaceTypeWithFuture ` .
Original file line number Diff line number Diff line change @@ -11,9 +11,7 @@ lib/utilities/change_builder/change_builder_dart.dart
1111lib/utilities/completion/inherited_reference_contributor.dart
1212lib/utilities/completion/suggestion_builder.dart
1313lib/utilities/completion/type_member_contributor.dart
14- lib/utilities/range_factory.dart
1514test/src/utilities/change_builder/change_builder_dart_test.dart
1615test/src/utilities/completion/completion_target_test.dart
1716test/src/utilities/visitors/local_declaration_visitor_test.dart
1817test/utilities/analyzer_converter_test.dart
19- test/utilities/range_factory_test.dart
Original file line number Diff line number Diff line change 55import 'package:analyzer/dart/ast/ast.dart' ;
66import 'package:analyzer/dart/ast/syntactic_entity.dart' ;
77import 'package:analyzer/dart/ast/token.dart' ;
8- import 'package:analyzer/dart/element/element.dart' ;
98import 'package:analyzer/dart/element/element2.dart' ;
109import 'package:analyzer/error/error.dart' ;
1110import 'package:analyzer/source/source_range.dart' ;
@@ -96,11 +95,6 @@ class RangeFactory {
9695 return startOffsetEndOffset (startOffset, endOffset);
9796 }
9897
99- /// Return a source range that covers the name of the given [element] .
100- SourceRange elementName (Element element) {
101- return SourceRange (element.nameOffset, element.nameLength);
102- }
103-
10498 /// Return a source range that starts at the end of [leftEntity] and ends at
10599 /// the end of [rightEntity] .
106100 SourceRange endEnd (SyntacticEntity leftEntity, SyntacticEntity rightEntity) {
Original file line number Diff line number Diff line change 11name : analyzer_plugin
22description : A framework and support code for building plugins for the analysis server.
3- version : 0.12.0
3+ version : 0.13.0-dev
44repository : https://github.com/dart-lang/sdk/tree/main/pkg/analyzer_plugin
55
66environment :
Original file line number Diff line number Diff line change @@ -508,12 +508,6 @@ class B {}
508508''' );
509509 }
510510
511- Future <void > test_elementName () async {
512- await resolveTestCode ('class ABC {}' );
513- var element = findElement.class_ ('ABC' );
514- expect (range.elementName (element), SourceRange (6 , 3 ));
515- }
516-
517511 Future <void > test_endEnd () async {
518512 await resolveTestCode ('main() {}' );
519513 var mainFunction = testUnit.declarations[0 ] as FunctionDeclaration ;
You can’t perform that action at this time.
0 commit comments