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

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

Issue 9651004: Make SourceInfo a class, rename its menthods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for formatting, lazily create LainesInfo Created 8 years, 9 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/editor/selectionactions/StructureSelectionAction.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/selectionactions/StructureSelectionAction.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/selectionactions/StructureSelectionAction.java
index d0ba1a74c63d57c76cda201108a215821a882548..2a44c8a252f688ae2e81ef02a9f606d81b6781a8 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/selectionactions/StructureSelectionAction.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/selectionactions/StructureSelectionAction.java
@@ -50,9 +50,10 @@ public abstract class StructureSelectionAction extends Action {
protected static SourceRange getSelectedNodeSourceRange(SourceReference sr, DartNode nodeToSelect)
throws DartModelException {
- int offset = nodeToSelect.getSourceStart();
- int end = Math.min(sr.getSourceRange().getLength(), nodeToSelect.getSourceStart()
- + nodeToSelect.getSourceLength() - 1);
+ int offset = nodeToSelect.getSourceInfo().getOffset();
+ int end = Math.min(sr.getSourceRange().getLength(),
+ nodeToSelect.getSourceInfo().getOffset()
+ + nodeToSelect.getSourceInfo().getLength() - 1);
return createSourceRange(offset, end);
}

Powered by Google App Engine
This is Rietveld 408576698