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

Unified Diff: pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart

Issue 2869083002: Convert server to use RangeFactory (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart b/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart
index a4cc1a90e33aa4676ac876c38c9218b6ff615c2d..7b2232a7f11811699789c030c74c978f9fff6827 100644
--- a/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/selection_analyzer.dart
@@ -4,10 +4,10 @@
library services.src.correction.selection_analyzer;
-import 'package:analysis_server/src/services/correction/source_range.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/ast/visitor.dart';
import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer_plugin/utilities/range_factory.dart';
/**
* A visitor for visiting [AstNode]s covered by a selection [SourceRange].
@@ -68,7 +68,7 @@ class SelectionAnalyzer extends GeneralizingAstVisitor<Object> {
}
AstNode firstNode = _selectedNodes[0];
AstNode lastNode = _selectedNodes[_selectedNodes.length - 1];
- return rangeStartEnd(firstNode, lastNode);
+ return range.startEnd(firstNode, lastNode);
}
/**
@@ -117,7 +117,7 @@ class SelectionAnalyzer extends GeneralizingAstVisitor<Object> {
@override
Object visitNode(AstNode node) {
- SourceRange nodeRange = rangeNode(node);
+ SourceRange nodeRange = range.node(node);
if (selection.covers(nodeRange)) {
if (isFirstNode) {
handleFirstSelectedNode(node);

Powered by Google App Engine
This is Rietveld 408576698