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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractLocalRefactoring.java

Issue 10825190: Don't infer non-final field types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tests for 'const' Created 8 years, 4 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.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractLocalRefactoring.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractLocalRefactoring.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractLocalRefactoring.java
index 0dedbd311ccf7cc9da66f2a17d6202bb66068054..001b523b951cc3d5caaa45e733e4d8b93843acfa 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractLocalRefactoring.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractLocalRefactoring.java
@@ -303,7 +303,7 @@ public class ExtractLocalRefactoring extends Refactoring {
List<SourceRange> occurrences = Lists.newArrayList();
// prepare selection
String selectionSource = utils.getText(selectionStart, selectionLength);
- List<com.google.dart.engine.scanner.Token> selectionTokens = ExtractUtils.tokenizeSource(selectionSource);
+ List<com.google.dart.engine.scanner.Token> selectionTokens = TokenUtils.getTokens(selectionSource);
selectionSource = StringUtils.join(selectionTokens, TOKEN_SEPARATOR);
// prepare enclosing function
com.google.dart.compiler.ast.DartFunction function;
@@ -319,7 +319,7 @@ public class ExtractLocalRefactoring extends Refactoring {
int functionOffset = functionSourceInfo.getOffset();
String functionSource = utils.getText(functionOffset, functionSourceInfo.getLength());
// prepare function tokens
- List<com.google.dart.engine.scanner.Token> functionTokens = ExtractUtils.tokenizeSource(functionSource);
+ List<com.google.dart.engine.scanner.Token> functionTokens = TokenUtils.getTokens(functionSource);
functionSource = StringUtils.join(functionTokens, TOKEN_SEPARATOR);
// find "selection" in "function" tokens
int lastIndex = 0;

Powered by Google App Engine
This is Rietveld 408576698