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

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

Issue 2538143003: Issue 27903. Use shared logic for computing new method location. (Closed)
Patch Set: Created 4 years 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/util.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart
index 82f2652821af8769cecb3c758646fdaba19e5446..babfeeec4b548dbf35b51616b82feefb0abdb901 100644
--- a/pkg/analysis_server/lib/src/services/correction/util.dart
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart
@@ -1317,6 +1317,16 @@ class CorrectionUtils {
member is MethodDeclaration && member.isGetter);
}
+ ClassMemberLocation prepareNewMethodLocation(
+ ClassDeclaration classDeclaration) {
+ return prepareNewClassMemberLocation(
+ classDeclaration,
+ (member) =>
+ member is FieldDeclaration ||
+ member is ConstructorDeclaration ||
+ member is MethodDeclaration);
+ }
+
/**
* Returns the source with indentation changed from [oldIndent] to
* [newIndent], keeping indentation of lines relative to each other.

Powered by Google App Engine
This is Rietveld 408576698