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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.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.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java
index 66aa0489b9761e0daea3a5353e7a647c81c2e014..3d521bed4305ac87844d62b82ca64ed15ae218bc 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java
@@ -15,7 +15,6 @@ package com.google.dart.tools.core.internal.formatter;
import com.google.dart.compiler.DartCompilationError;
import com.google.dart.compiler.DartCompilerListener;
-import com.google.dart.compiler.Source;
import com.google.dart.compiler.ast.DartComment;
import com.google.dart.compiler.ast.DartExpression;
import com.google.dart.compiler.ast.DartMethodDefinition;
@@ -217,8 +216,8 @@ public class CodeSnippetParsingUtil {
int[][] locs = new int[n][2];
for (int i = 0; i < locs.length; i++) {
DartComment comment = comments.get(i);
- int start = comment.getSourceStart();
- int stop = start + comment.getSourceLength();
+ int start = comment.getSourceInfo().getOffset();
+ int stop = start + comment.getSourceInfo().getLength();
locs[i][0] = start;
locs[i][1] = stop;
}
@@ -236,7 +235,7 @@ public class CodeSnippetParsingUtil {
problems = compilationResultProblems;
} else {
System.arraycopy(compilationResultProblems, 0,
- (problems = new CategorizedProblem[problemsCount]), 0, problemsCount);
+ problems = new CategorizedProblem[problemsCount], 0, problemsCount);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698