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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/index/Location.java

Issue 11787017: Initial implementation of MemoryIndexStoreImpl and IndexContributor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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.engine/src/com/google/dart/engine/index/Location.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/index/Location.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/index/Location.java
index 2b5aec5c35fba8277bb9cabf4aa83109e2506735..36609a45711d43ca3408afc32a859d646c6522dd 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/index/Location.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/index/Location.java
@@ -13,7 +13,7 @@
*/
package com.google.dart.engine.index;
-import com.google.dart.engine.element.ElementLocation;
+import com.google.dart.engine.element.ElementProxy;
/**
* Instances of the class <code>Location</code> represent a location related to an element. The
@@ -30,7 +30,7 @@ public class Location {
/**
* The element containing this location.
*/
- private final ElementLocation elementLocation;
+ private final ElementProxy element;
/**
* The offset of this location within the resource containing the element.
@@ -52,25 +52,25 @@ public class Location {
* Initialize a newly create location to be relative to the given element at the given offset with
* the given length.
*
- * @param elementLocation the element containing this location
+ * @param element the {@link ElementProxy} containing this location
* @param offset the offset of this location within the resource containing the element
* @param length the length of this location
*/
- public Location(ElementLocation elementLocation, int offset, int length, String importPrefix) {
- if (elementLocation == null) {
- throw new IllegalArgumentException("element cannot be null");
+ public Location(ElementProxy element, int offset, int length, String importPrefix) {
+ if (element == null) {
+ throw new IllegalArgumentException("element location cannot be null");
}
- this.elementLocation = elementLocation;
+ this.element = element;
this.offset = offset;
this.length = length;
this.importPrefix = importPrefix;
}
/**
- * @return the {@link ElementLocation} containing this location
+ * @return the {@link ElementProxy} containing this location.
*/
- public ElementLocation getElementLocation() {
- return elementLocation;
+ public ElementProxy getElement() {
+ return element;
}
/**
@@ -100,7 +100,7 @@ public class Location {
@Override
public String toString() {
- String result = "[" + offset + " - " + (offset + length - 1) + "] in " + elementLocation;
+ String result = "[" + offset + " - " + (offset + length - 1) + "] in " + element;
if (importPrefix != null) {
result += " with prefix '" + importPrefix + "'";
}

Powered by Google App Engine
This is Rietveld 408576698