| Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| index 8064e8b45a5872706ddd88807322f501fc947555..ef5cd72c4ef55477bcf63af7e9da4536eefd0afe 100644
|
| --- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| +++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
|
| @@ -21,8 +21,6 @@ import 'package:analysis_server/src/services/correction/levenshtein.dart';
|
| import 'package:analysis_server/src/services/correction/name_suggestion.dart';
|
| import 'package:analysis_server/src/services/correction/namespace.dart';
|
| import 'package:analysis_server/src/services/correction/source_buffer.dart';
|
| -import 'package:analysis_server/src/services/correction/source_range.dart'
|
| - as rf;
|
| import 'package:analysis_server/src/services/correction/strings.dart';
|
| import 'package:analysis_server/src/services/correction/util.dart';
|
| import 'package:analysis_server/src/services/search/hierarchy.dart';
|
| @@ -48,6 +46,7 @@ import 'package:analyzer/src/generated/java_core.dart';
|
| import 'package:analyzer/src/generated/parser.dart';
|
| import 'package:analyzer/src/generated/source.dart';
|
| import 'package:analyzer/src/generated/utilities_dart.dart';
|
| +import 'package:analyzer_plugin/utilities/range_factory.dart';
|
| import 'package:path/path.dart';
|
|
|
| /**
|
| @@ -465,7 +464,7 @@ class FixProcessor {
|
| AstNode node = this.node;
|
| FunctionBody body = node.getAncestor((n) => n is FunctionBody);
|
| if (body != null && body.keyword == null) {
|
| - _addReplaceEdit(rf.rangeStartLength(body, 0), 'async ');
|
| + _addReplaceEdit(range.startLength(body, 0), 'async ');
|
| _replaceReturnTypeWithFuture(body);
|
| _addFix(DartFixKind.ADD_ASYNC, []);
|
| return true;
|
| @@ -476,7 +475,7 @@ class FixProcessor {
|
| void _addFix_addAsync_asyncFor() {
|
| FunctionBody body = node.getAncestor((n) => n is FunctionBody);
|
| if (body != null && body.keyword == null) {
|
| - _addReplaceEdit(rf.rangeStartLength(body, 0), 'async ');
|
| + _addReplaceEdit(range.startLength(body, 0), 'async ');
|
| _replaceReturnTypeWithFuture(body);
|
| _addFix(DartFixKind.ADD_ASYNC, []);
|
| }
|
| @@ -654,8 +653,7 @@ class FixProcessor {
|
| }
|
|
|
| void _addFix_boolInsteadOfBoolean() {
|
| - SourceRange range = rf.rangeError(error);
|
| - _addReplaceEdit(range, 'bool');
|
| + _addReplaceEdit(range.error(error), 'bool');
|
| _addFix(DartFixKind.REPLACE_BOOLEAN_WITH_BOOL, []);
|
| }
|
|
|
| @@ -665,9 +663,9 @@ class FixProcessor {
|
| AstNode parent = node.parent;
|
| while (parent != null) {
|
| if (parent is MethodInvocation && parent.target == node) {
|
| - _addReplaceEdit(rf.rangeToken(parent.operator), '?.');
|
| + _addReplaceEdit(range.token(parent.operator), '?.');
|
| } else if (parent is PropertyAccess && parent.target == node) {
|
| - _addReplaceEdit(rf.rangeToken(parent.operator), '?.');
|
| + _addReplaceEdit(range.token(parent.operator), '?.');
|
| } else {
|
| break;
|
| }
|
| @@ -692,7 +690,7 @@ class FixProcessor {
|
| if (newType is InterfaceType || newType is FunctionType) {
|
| String newTypeSource =
|
| utils.getTypeSource(newType, librariesToImport);
|
| - _addReplaceEdit(rf.rangeNode(typeNode), newTypeSource);
|
| + _addReplaceEdit(range.node(typeNode), newTypeSource);
|
| _addFix(DartFixKind.CHANGE_TYPE_ANNOTATION,
|
| [resolutionMap.typeForTypeName(typeNode), newTypeSource]);
|
| }
|
| @@ -719,8 +717,7 @@ class FixProcessor {
|
| _addInsertEdit,
|
| _addRemoveEdit,
|
| _addReplaceEdit,
|
| - rf.rangeStartLength,
|
| - rf.rangeNode);
|
| + range.node);
|
| _addFix(DartFixKind.CONVERT_FLUTTER_CHILD, []);
|
| return;
|
| }
|
| @@ -819,7 +816,7 @@ class FixProcessor {
|
| // insert source
|
| _insertBuilder(sb, targetUnit);
|
| if (prefixElement == null) {
|
| - _addLinkedPosition('NAME', sb, rf.rangeNode(node));
|
| + _addLinkedPosition('NAME', sb, range.node(node));
|
| }
|
| // add proposal
|
| _addFix(DartFixKind.CREATE_CLASS, [name]);
|
| @@ -974,7 +971,7 @@ class FixProcessor {
|
| // insert source
|
| _insertBuilder(sb, targetElement);
|
| if (targetFile == file) {
|
| - _addLinkedPosition('NAME', sb, rf.rangeNode(name));
|
| + _addLinkedPosition('NAME', sb, range.node(name));
|
| }
|
| // add proposal
|
| _addFix(DartFixKind.CREATE_CONSTRUCTOR, [constructorName]);
|
| @@ -1202,7 +1199,7 @@ class FixProcessor {
|
| _insertBuilder(sb, targetClassElement);
|
| // add linked positions
|
| if (targetFile == file) {
|
| - _addLinkedPosition('NAME', sb, rf.rangeNode(node));
|
| + _addLinkedPosition('NAME', sb, range.node(node));
|
| }
|
| // add proposal
|
| _addFix(DartFixKind.CREATE_FIELD, [name]);
|
| @@ -1339,7 +1336,7 @@ class FixProcessor {
|
| _insertBuilder(sb, targetClassElement);
|
| // add linked positions
|
| if (targetFile == file) {
|
| - _addLinkedPosition('NAME', sb, rf.rangeNode(node));
|
| + _addLinkedPosition('NAME', sb, range.node(node));
|
| }
|
| // add proposal
|
| _addFix(DartFixKind.CREATE_GETTER, [name]);
|
| @@ -1412,7 +1409,7 @@ class FixProcessor {
|
| // insert source
|
| _insertBuilder(sb, unitElement);
|
| // add linked positions
|
| - _addLinkedPosition('NAME', sb, rf.rangeNode(node));
|
| + _addLinkedPosition('NAME', sb, range.node(node));
|
| // add proposal
|
| _addFix(DartFixKind.CREATE_LOCAL_VARIABLE, [name]);
|
| }
|
| @@ -1631,8 +1628,7 @@ class FixProcessor {
|
| // may be apply prefix
|
| PrefixElement prefix = imp.prefix;
|
| if (prefix != null) {
|
| - SourceRange range = rf.rangeStartLength(node, 0);
|
| - _addReplaceEdit(range, '${prefix.displayName}.');
|
| + _addReplaceEdit(range.startLength(node, 0), '${prefix.displayName}.');
|
| _addFix(DartFixKind.IMPORT_LIBRARY_PREFIX,
|
| [libraryElement.displayName, prefix.displayName]);
|
| continue;
|
| @@ -1655,8 +1651,10 @@ class FixProcessor {
|
| alreadyImportedWithPrefix.add(libraryElement.source);
|
| // update library
|
| String newShowCode = 'show ${showNames.join(', ')}';
|
| + int offset = showCombinator.offset;
|
| + int length = showCombinator.end - offset;
|
| _addReplaceEdit(
|
| - rf.rangeOffsetEnd(showCombinator), newShowCode, unitLibraryElement);
|
| + new SourceRange(offset, length), newShowCode, unitLibraryElement);
|
| _addFix(DartFixKind.IMPORT_LIBRARY_SHOW, [libraryName]);
|
| }
|
| }
|
| @@ -1743,7 +1741,7 @@ class FixProcessor {
|
| if (coveredNode is IsExpression) {
|
| IsExpression isExpression = coveredNode as IsExpression;
|
| _addReplaceEdit(
|
| - rf.rangeEndEnd(isExpression.expression, isExpression), ' != null');
|
| + range.endEnd(isExpression.expression, isExpression), ' != null');
|
| _addFix(DartFixKind.USE_NOT_EQ_NULL, []);
|
| }
|
| }
|
| @@ -1752,7 +1750,7 @@ class FixProcessor {
|
| if (coveredNode is IsExpression) {
|
| IsExpression isExpression = coveredNode as IsExpression;
|
| _addReplaceEdit(
|
| - rf.rangeEndEnd(isExpression.expression, isExpression), ' == null');
|
| + range.endEnd(isExpression.expression, isExpression), ' == null');
|
| _addFix(DartFixKind.USE_EQ_EQ_NULL, []);
|
| }
|
| }
|
| @@ -1789,12 +1787,10 @@ class FixProcessor {
|
| if (declarationList.variables.length == 1 &&
|
| keywordToken.keyword == Keyword.FINAL) {
|
| if (declarationList.type != null) {
|
| - SourceRange range =
|
| - rf.rangeStartStart(keywordToken, declarationList.type);
|
| - _addRemoveEdit(range);
|
| + _addRemoveEdit(
|
| + range.startStart(keywordToken, declarationList.type));
|
| } else {
|
| - SourceRange range = rf.rangeStartStart(keywordToken, variable);
|
| - _addReplaceEdit(range, 'var ');
|
| + _addReplaceEdit(range.startStart(keywordToken, variable), 'var ');
|
| }
|
| String fieldName = getter.variable.displayName;
|
| _addFix(DartFixKind.MAKE_FIELD_NOT_FINAL, [fieldName]);
|
| @@ -1813,8 +1809,7 @@ class FixProcessor {
|
| final awaitExpression = node;
|
| if (awaitExpression is AwaitExpression) {
|
| final awaitToken = awaitExpression.awaitKeyword;
|
| - _addRemoveEdit(
|
| - rf.rangeStartEnd(awaitToken.offset, awaitToken.next.offset));
|
| + _addRemoveEdit(range.startStart(awaitToken, awaitToken.next));
|
| _addFix(DartFixKind.REMOVE_AWAIT, []);
|
| }
|
| }
|
| @@ -1825,7 +1820,7 @@ class FixProcessor {
|
| AstNode parent = coveredNode.parent;
|
| if (parent is BinaryExpression) {
|
| if (parent.rightOperand == coveredNode) {
|
| - _addRemoveEdit(rf.rangeEndEnd(parent.leftOperand, coveredNode));
|
| + _addRemoveEdit(range.endEnd(parent.leftOperand, coveredNode));
|
| _addFix(DartFixKind.REMOVE_DEAD_CODE, []);
|
| }
|
| }
|
| @@ -1833,7 +1828,7 @@ class FixProcessor {
|
| Block block = coveringNode;
|
| List<Statement> statementsToRemove = <Statement>[];
|
| for (Statement statement in block.statements) {
|
| - if (rf.rangeNode(statement).intersects(errorRange)) {
|
| + if (range.node(statement).intersects(errorRange)) {
|
| statementsToRemove.add(statement);
|
| }
|
| }
|
| @@ -1854,12 +1849,11 @@ class FixProcessor {
|
| void _addFix_removeEmptyStatement() {
|
| EmptyStatement emptyStatement = node;
|
| if (emptyStatement.parent is Block) {
|
| - _addRemoveEdit(utils.getLinesRange(rf.rangeNode(emptyStatement)));
|
| + _addRemoveEdit(utils.getLinesRange(range.node(emptyStatement)));
|
| _addFix(DartFixKind.REMOVE_EMPTY_STATEMENT, []);
|
| } else {
|
| _addReplaceEdit(
|
| - rf.rangeStartEnd(
|
| - emptyStatement.beginToken.previous.end, emptyStatement.end),
|
| + range.endEnd(emptyStatement.beginToken.previous, emptyStatement),
|
| ' {}');
|
| _addFix(DartFixKind.REPLACE_WITH_BRACKETS, []);
|
| }
|
| @@ -1872,10 +1866,7 @@ class FixProcessor {
|
| if (ancestor == null) {
|
| return;
|
| }
|
| -
|
| - final start = ancestor.name.end;
|
| - final end = ancestor.initializer.end;
|
| - _addRemoveEdit(rf.rangeStartLength(start, end - start));
|
| + _addRemoveEdit(range.endEnd(ancestor.name, ancestor.initializer));
|
| _addFix(DartFixKind.REMOVE_INITIALIZER, []);
|
| }
|
|
|
| @@ -1883,7 +1874,7 @@ class FixProcessor {
|
| MethodDeclaration declaration =
|
| node.getAncestor((node) => node is MethodDeclaration);
|
| if (declaration != null) {
|
| - _addRemoveEdit(utils.getLinesRange(rf.rangeNode(declaration)));
|
| + _addRemoveEdit(utils.getLinesRange(range.node(declaration)));
|
| _addFix(DartFixKind.REMOVE_METHOD_DECLARATION, []);
|
| }
|
| }
|
| @@ -1894,7 +1885,7 @@ class FixProcessor {
|
| SimpleIdentifier name = method.name;
|
| FunctionBody body = method.body;
|
| if (name != null && body != null) {
|
| - _addReplaceEdit(rf.rangeEndStart(name, body), ' ');
|
| + _addReplaceEdit(range.endStart(name, body), ' ');
|
| _addFix(DartFixKind.REMOVE_PARAMETERS_IN_GETTER_DECLARATION, []);
|
| }
|
| }
|
| @@ -1904,7 +1895,7 @@ class FixProcessor {
|
| if (node is SimpleIdentifier && node.parent is MethodInvocation) {
|
| MethodInvocation invocation = node.parent as MethodInvocation;
|
| if (invocation.methodName == node && invocation.target != null) {
|
| - _addRemoveEdit(rf.rangeEndEnd(node, invocation));
|
| + _addRemoveEdit(range.endEnd(node, invocation));
|
| _addFix(DartFixKind.REMOVE_PARENTHESIS_IN_GETTER_INVOCATION, []);
|
| }
|
| }
|
| @@ -1916,10 +1907,10 @@ class FixProcessor {
|
| : node.getAncestor((node) => node is ThisExpression);
|
| final parent = thisExpression.parent;
|
| if (parent is PropertyAccess) {
|
| - _addRemoveEdit(rf.rangeStartEnd(parent.offset, parent.operator.end));
|
| + _addRemoveEdit(range.startEnd(parent, parent.operator));
|
| _addFix(DartFixKind.REMOVE_THIS_EXPRESSION, []);
|
| } else if (parent is MethodInvocation) {
|
| - _addRemoveEdit(rf.rangeStartEnd(parent.offset, parent.operator.end));
|
| + _addRemoveEdit(range.startEnd(parent, parent.operator));
|
| _addFix(DartFixKind.REMOVE_THIS_EXPRESSION, []);
|
| }
|
| }
|
| @@ -1927,7 +1918,7 @@ class FixProcessor {
|
| void _addFix_removeTypeName() {
|
| final TypeName type = node.getAncestor((node) => node is TypeName);
|
| if (type != null) {
|
| - _addRemoveEdit(rf.rangeStartEnd(type.offset, type.endToken.next.offset));
|
| + _addRemoveEdit(range.startStart(type, type.endToken.next));
|
| _addFix(DartFixKind.REMOVE_TYPE_NAME, []);
|
| }
|
| }
|
| @@ -1940,7 +1931,7 @@ class FixProcessor {
|
| Expression expression = asExpression.expression;
|
| int expressionPrecedence = getExpressionPrecedence(expression);
|
| // remove 'as T' from 'e as T'
|
| - _addRemoveEdit(rf.rangeEndEnd(expression, asExpression));
|
| + _addRemoveEdit(range.endEnd(expression, asExpression));
|
| _removeEnclosingParentheses(asExpression, expressionPrecedence);
|
| // done
|
| _addFix(DartFixKind.REMOVE_UNNECESSARY_CAST, []);
|
| @@ -1952,7 +1943,7 @@ class FixProcessor {
|
| if (catchClause is CatchClause &&
|
| catchClause.exceptionParameter == node) {
|
| _addRemoveEdit(
|
| - rf.rangeStartStart(catchClause.catchKeyword, catchClause.body));
|
| + range.startStart(catchClause.catchKeyword, catchClause.body));
|
| _addFix(DartFixKind.REMOVE_UNUSED_CATCH_CLAUSE, []);
|
| }
|
| }
|
| @@ -1964,7 +1955,7 @@ class FixProcessor {
|
| if (catchClause is CatchClause &&
|
| catchClause.stackTraceParameter == node &&
|
| catchClause.exceptionParameter != null) {
|
| - _addRemoveEdit(rf.rangeEndEnd(catchClause.exceptionParameter, node));
|
| + _addRemoveEdit(range.endEnd(catchClause.exceptionParameter, node));
|
| _addFix(DartFixKind.REMOVE_UNUSED_CATCH_STACK, []);
|
| }
|
| }
|
| @@ -1978,14 +1969,13 @@ class FixProcessor {
|
| return;
|
| }
|
| // remove the whole line with import
|
| - _addRemoveEdit(utils.getLinesRange(rf.rangeNode(importDirective)));
|
| + _addRemoveEdit(utils.getLinesRange(range.node(importDirective)));
|
| // done
|
| _addFix(DartFixKind.REMOVE_UNUSED_IMPORT, []);
|
| }
|
|
|
| void _addFix_replaceVarWithDynamic() {
|
| - SourceRange range = rf.rangeError(error);
|
| - _addReplaceEdit(range, 'dynamic');
|
| + _addReplaceEdit(range.error(error), 'dynamic');
|
| _addFix(DartFixKind.REPLACE_VAR_WITH_DYNAMIC, []);
|
| }
|
|
|
| @@ -2010,7 +2000,7 @@ class FixProcessor {
|
| buffer.write(' ??= ');
|
| buffer.write(utils.getNodeText(expression.rightHandSide));
|
| buffer.write(';');
|
| - _addReplaceEdit(rf.rangeNode(ifStatement), buffer.toString());
|
| + _addReplaceEdit(range.node(ifStatement), buffer.toString());
|
| _addFix(DartFixKind.REPLACE_WITH_CONDITIONAL_ASSIGNMENT, []);
|
| }
|
| }
|
| @@ -2019,7 +2009,7 @@ class FixProcessor {
|
| void _addFix_replaceWithConstInstanceCreation() {
|
| if (coveredNode is InstanceCreationExpression) {
|
| var instanceCreation = coveredNode as InstanceCreationExpression;
|
| - _addReplaceEdit(rf.rangeToken(instanceCreation.keyword), 'const');
|
| + _addReplaceEdit(range.token(instanceCreation.keyword), 'const');
|
| _addFix(DartFixKind.USE_CONST, []);
|
| }
|
| }
|
| @@ -2028,7 +2018,7 @@ class FixProcessor {
|
| final FunctionTypedFormalParameter functionTyped =
|
| node.getAncestor((node) => node is FunctionTypedFormalParameter);
|
| if (functionTyped != null) {
|
| - _addReplaceEdit(rf.rangeNode(functionTyped),
|
| + _addReplaceEdit(range.node(functionTyped),
|
| utils.getNodeText(functionTyped.identifier));
|
| _addFix(DartFixKind.REPLACE_WITH_IDENTIFIER, []);
|
| } else {
|
| @@ -2050,7 +2040,7 @@ class FixProcessor {
|
| } else {
|
| buffer.write('{}');
|
| }
|
| - _addReplaceEdit(rf.rangeNode(instanceCreation), buffer.toString());
|
| + _addReplaceEdit(range.node(instanceCreation), buffer.toString());
|
| _addFix(DartFixKind.REPLACE_WITH_LITERAL, []);
|
| }
|
|
|
| @@ -2067,7 +2057,7 @@ class FixProcessor {
|
| buffer.write('.');
|
| }
|
| buffer.write(utils.getNodeText(expression.function));
|
| - _addReplaceEdit(rf.rangeNode(ancestor), buffer.toString());
|
| + _addReplaceEdit(range.node(ancestor), buffer.toString());
|
| _addFix(DartFixKind.REPLACE_WITH_TEAR_OFF, []);
|
| }
|
|
|
| @@ -2124,7 +2114,7 @@ class FixProcessor {
|
| // If we have a close enough element, suggest to use it.
|
| if (finder._element != null) {
|
| String closestName = finder._element.name;
|
| - _addReplaceEdit(rf.rangeNode(node), closestName);
|
| + _addReplaceEdit(range.node(node), closestName);
|
| // Add proposal.
|
| if (closestName != null) {
|
| _addFix(DartFixKind.CHANGE_TO, [closestName]);
|
| @@ -2183,7 +2173,7 @@ class FixProcessor {
|
| // if we have close enough element, suggest to use it
|
| if (finder._element != null) {
|
| String closestName = finder._element.name;
|
| - _addReplaceEdit(rf.rangeNode(node), closestName);
|
| + _addReplaceEdit(range.node(node), closestName);
|
| _addFix(DartFixKind.CHANGE_TO, [closestName]);
|
| }
|
| }
|
| @@ -2229,7 +2219,7 @@ class FixProcessor {
|
| }
|
| // insert source
|
| _insertBuilder(sb, unitElement);
|
| - _addLinkedPosition('NAME', sb, rf.rangeNode(node));
|
| + _addLinkedPosition('NAME', sb, range.node(node));
|
| // add proposal
|
| _addFix(DartFixKind.CREATE_FUNCTION, [name]);
|
| }
|
| @@ -2270,7 +2260,7 @@ class FixProcessor {
|
| // If we have a close enough element, suggest to use it.
|
| if (finder._element != null) {
|
| String closestName = finder._element.name;
|
| - _addReplaceEdit(rf.rangeNode(node), closestName);
|
| + _addReplaceEdit(range.node(node), closestName);
|
| _addFix(DartFixKind.CHANGE_TO, [closestName]);
|
| }
|
| }
|
| @@ -2352,7 +2342,7 @@ class FixProcessor {
|
| _insertBuilder(sb, targetElement);
|
| // add linked positions
|
| if (targetFile == file) {
|
| - _addLinkedPosition('NAME', sb, rf.rangeNode(node));
|
| + _addLinkedPosition('NAME', sb, range.node(node));
|
| }
|
| // add proposal
|
| _addFix(DartFixKind.CREATE_METHOD, [name]);
|
| @@ -2438,10 +2428,10 @@ class FixProcessor {
|
| Expression target = n.target.unParenthesized;
|
| // replace "/" with "~/"
|
| BinaryExpression binary = target as BinaryExpression;
|
| - _addReplaceEdit(rf.rangeToken(binary.operator), '~/');
|
| + _addReplaceEdit(range.token(binary.operator), '~/');
|
| // remove everything before and after
|
| - _addRemoveEdit(rf.rangeStartStart(n, binary.leftOperand));
|
| - _addRemoveEdit(rf.rangeEndEnd(binary.rightOperand, n));
|
| + _addRemoveEdit(range.startStart(n, binary.leftOperand));
|
| + _addRemoveEdit(range.endEnd(binary.rightOperand, n));
|
| // add proposal
|
| _addFix(DartFixKind.USE_EFFECTIVE_INTEGER_DIVISION, []);
|
| // done
|
| @@ -2461,8 +2451,7 @@ class FixProcessor {
|
| String declaringTypeCode =
|
| utils.getTypeSource(declaringType, librariesToImport);
|
| // replace "target" with class name
|
| - SourceRange range = rf.rangeNode(target);
|
| - _addReplaceEdit(range, declaringTypeCode);
|
| + _addReplaceEdit(range.node(target), declaringTypeCode);
|
| // add proposal
|
| _addFix(DartFixKind.CHANGE_TO_STATIC_ACCESS, [declaringType]);
|
| }
|
| @@ -2531,7 +2520,7 @@ class FixProcessor {
|
|
|
| exitPosition = new Position(file, token.offset - 1);
|
| String indent = utils.getIndent(1);
|
| - _addReplaceEdit(rf.rangeStartLength(token, 0), '@override$eol$indent');
|
| + _addReplaceEdit(range.startLength(token, 0), '@override$eol$indent');
|
| _addFix(DartFixKind.LINT_ADD_OVERRIDE, []);
|
| }
|
|
|
| @@ -2540,8 +2529,8 @@ class FixProcessor {
|
| if (node is InterpolationExpression) {
|
| Token right = node.rightBracket;
|
| if (node.expression != null && right != null) {
|
| - _addReplaceEdit(rf.rangeStartStart(node, node.expression), r'$');
|
| - _addRemoveEdit(rf.rangeToken(right));
|
| + _addReplaceEdit(range.startStart(node, node.expression), r'$');
|
| + _addRemoveEdit(range.token(right));
|
| _addFix(DartFixKind.LINT_REMOVE_INTERPOLATION_BRACES, []);
|
| }
|
| }
|
| @@ -2616,7 +2605,7 @@ class FixProcessor {
|
| _insertBuilder(sb, target);
|
| // add linked positions
|
| if (targetSource == unitSource) {
|
| - _addLinkedPosition('NAME', sb, rf.rangeNode(node));
|
| + _addLinkedPosition('NAME', sb, range.node(node));
|
| }
|
| }
|
|
|
| @@ -3129,8 +3118,8 @@ class FixProcessor {
|
| if (getExpressionParentPrecedence(parenthesized) > exprPrecedence) {
|
| break;
|
| }
|
| - _addRemoveEdit(rf.rangeToken(parenthesized.leftParenthesis));
|
| - _addRemoveEdit(rf.rangeToken(parenthesized.rightParenthesis));
|
| + _addRemoveEdit(range.token(parenthesized.leftParenthesis));
|
| + _addRemoveEdit(range.token(parenthesized.rightParenthesis));
|
| expr = parenthesized;
|
| }
|
| }
|
| @@ -3166,7 +3155,7 @@ class FixProcessor {
|
| } else {
|
| returnTypeCode = '$futureTypeCode<$nodeCode>';
|
| }
|
| - _addReplaceEdit(rf.rangeNode(typeName), returnTypeCode);
|
| + _addReplaceEdit(range.node(typeName), returnTypeCode);
|
| }
|
|
|
| void _updateFinderWithClassMembers(
|
|
|