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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartAutoIndentStrategy.java

Issue 10704180: Use 'int' instead of Position. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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/ui/internal/text/dart/DartAutoIndentStrategy.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartAutoIndentStrategy.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartAutoIndentStrategy.java
index e80879ab31f51222551132754cdb4cc18d750f00..ea44d2cae8719dff0c598c17d8469a7458892f97 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartAutoIndentStrategy.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/dart/DartAutoIndentStrategy.java
@@ -412,9 +412,9 @@ public class DartAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
}
DartScanner.Location location = scanner.getTokenLocation();
- int tokenOffset = location.getBegin().getPos();
- int tokenLength = location.getEnd().getPos() + 1 - tokenOffset; // inclusive
- // end
+ int tokenOffset = location.getBegin();
+ int tokenLength = location.getEnd() + 1 - tokenOffset; // inclusive
+ // end
return new Region(tokenOffset + scanRegion.getOffset(), tokenLength);
} catch (BadLocationException x) {

Powered by Google App Engine
This is Rietveld 408576698