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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/text/folding/DefaultDartFoldingStructureProvider.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/text/folding/DefaultDartFoldingStructureProvider.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/text/folding/DefaultDartFoldingStructureProvider.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/text/folding/DefaultDartFoldingStructureProvider.java
index a7110f92a712fbb4c6a35e220251a7003fa5ee8e..08ca03854061d59a5d21c1ddd66829d8299354d7 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/text/folding/DefaultDartFoldingStructureProvider.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/text/folding/DefaultDartFoldingStructureProvider.java
@@ -1018,7 +1018,7 @@ public class DefaultDartFoldingStructureProvider implements IDartFoldingStructur
while (true) {
Token token = scanner.next();
- start = scanner.getTokenLocation().getBegin().getPos();
+ start = scanner.getTokenLocation().getBegin();
if (start > stop) {
break;
}
@@ -1027,7 +1027,7 @@ public class DefaultDartFoldingStructureProvider implements IDartFoldingStructur
// case ITerminalSymbols.TokenNameCOMMENT_JAVADOC:
// case ITerminalSymbols.TokenNameCOMMENT_BLOCK: {
if (token == Token.COMMENT) {
- int end = scanner.getTokenLocation().getEnd().getPos() + 1;
+ int end = scanner.getTokenLocation().getEnd() + 1;
regions.add(new Region(start, end - start));
continue;
}
@@ -1219,13 +1219,13 @@ public class DefaultDartFoldingStructureProvider implements IDartFoldingStructur
if (terminal == Token.COMMENT) {
if (!foundComment) {
- headerStart = scanner.getTokenLocation().getBegin().getPos();
+ headerStart = scanner.getTokenLocation().getBegin();
}
- headerEnd = scanner.getTokenLocation().getEnd().getPos();
+ headerEnd = scanner.getTokenLocation().getEnd();
foundComment = true;
}
terminal = scanner.next();
- if (scanner.getTokenLocation().getBegin().getPos() > end) {
+ if (scanner.getTokenLocation().getBegin() > end) {
break;
}
}

Powered by Google App Engine
This is Rietveld 408576698