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

Unified Diff: editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/refactoring/ExtractLocalRefactoringImpl.java

Issue 250823006: Translate parts of engine.services project. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move to pkg/analysis_services/ Created 6 years, 8 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: editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/refactoring/ExtractLocalRefactoringImpl.java
diff --git a/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/refactoring/ExtractLocalRefactoringImpl.java b/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/refactoring/ExtractLocalRefactoringImpl.java
index b731b024ff2b593f2fcdeb0400b6ff0de12a93e4..56b182dcb912735ec92ff3834e277da358c44ba2 100644
--- a/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/refactoring/ExtractLocalRefactoringImpl.java
+++ b/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/internal/refactoring/ExtractLocalRefactoringImpl.java
@@ -154,7 +154,7 @@ public class ExtractLocalRefactoringImpl extends RefactoringImpl implements Extr
// insert variable declaration
String eol = utils.getEndOfLine();
Edit edit = new Edit(targetStatement.getOffset(), 0, declarationSource + eol + prefix);
- change.addEdit("Add variable declaration", edit);
+ change.addEdit(edit, "Add variable declaration");
}
// prepare replacement
String occurrenceReplacement = localName;
@@ -164,7 +164,7 @@ public class ExtractLocalRefactoringImpl extends RefactoringImpl implements Extr
// replace occurrences with variable reference
for (SourceRange range : occurrences) {
Edit edit = new Edit(range, occurrenceReplacement);
- change.addEdit("Replace expression with variable reference", edit);
+ change.addEdit(edit, "Replace expression with variable reference");
}
return change;
}

Powered by Google App Engine
This is Rietveld 408576698