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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/index/impl/InMemoryIndex.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/index/impl/InMemoryIndex.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/index/impl/InMemoryIndex.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/index/impl/InMemoryIndex.java
index bf01ba19bbc968e9dbf7da2a7c63b4c11f9157f7..8ed696a2112471c206057ad36907085b1d7157e6 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/index/impl/InMemoryIndex.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/index/impl/InMemoryIndex.java
@@ -352,7 +352,7 @@ public class InMemoryIndex implements Index {
initializedLibraries.add(libraryUri);
DartLibraryImpl library = new DartLibraryImpl(librarySource);
for (DartUnit ast : libraryUnit.getUnits()) {
- DartSource unitSource = ast.getSource();
+ DartSource unitSource = (DartSource) ast.getSourceInfo().getSource();
URI unitUri = unitSource.getUri();
Resource resource = new Resource(unitUri.toString());
String relativePath = unitSource.getRelativePath();
@@ -361,7 +361,7 @@ public class InMemoryIndex implements Index {
long startTime = System.currentTimeMillis();
indexResource(resource, compilationUnit, ast);
long endTime = System.currentTimeMillis();
- initIndexingTime += (endTime - startTime);
+ initIndexingTime += endTime - startTime;
}
for (LibraryUnit importedLibrary : libraryUnit.getImports()) {
indexBundledLibrary(importedLibrary, initializedLibraries);
@@ -407,7 +407,7 @@ public class InMemoryIndex implements Index {
initializedLibraries.add(libraryUri);
DartLibraryImpl library = new DartLibraryImpl(librarySource);
for (DartUnit ast : libraryUnit.getUnits()) {
- DartSource unitSource = ast.getSource();
+ DartSource unitSource = (DartSource) ast.getSourceInfo().getSource();
URI unitUri = unitSource.getUri();
Resource resource = new Resource(unitUri.toString());
CompilationUnit compilationUnit = new CompilationUnitImpl(library, unitUri,
@@ -416,7 +416,7 @@ public class InMemoryIndex implements Index {
long startTime = System.currentTimeMillis();
indexResource(resource, compilationUnit, ast);
long endTime = System.currentTimeMillis();
- initIndexingTime += (endTime - startTime);
+ initIndexingTime += endTime - startTime;
}
for (LibraryUnit importedLibrary : libraryUnit.getImports()) {
// library.getImportedLibrary(importedLibrary.getSource().getUri());

Powered by Google App Engine
This is Rietveld 408576698