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

Unified Diff: pkg/analysis_server/tool/spec/generated/java/types/ImplementedClass.java

Issue 1372623004: New analysis.implemented notification specification. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Simplify to just list of classes/members that have implementations. Created 5 years, 3 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: pkg/analysis_server/tool/spec/generated/java/types/ImplementedClass.java
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/FoldingRegion.java b/pkg/analysis_server/tool/spec/generated/java/types/ImplementedClass.java
similarity index 69%
copy from pkg/analysis_server/tool/spec/generated/java/types/FoldingRegion.java
copy to pkg/analysis_server/tool/spec/generated/java/types/ImplementedClass.java
index 3e63a4e0582bc9d89006f0900d776b0bf81ed32b..dbe70969f5e53f2b47ac5f21321da5ac67efd73b 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/FoldingRegion.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ImplementedClass.java
@@ -32,65 +32,57 @@ import java.util.Iterator;
import org.apache.commons.lang3.StringUtils;
/**
- * A description of a region that can be folded.
+ * A description of a class that is implemented or extended.
*
* @coverage dart.server.generated.types
*/
@SuppressWarnings("unused")
-public class FoldingRegion {
+public class ImplementedClass {
- public static final FoldingRegion[] EMPTY_ARRAY = new FoldingRegion[0];
+ public static final ImplementedClass[] EMPTY_ARRAY = new ImplementedClass[0];
- public static final List<FoldingRegion> EMPTY_LIST = Lists.newArrayList();
+ public static final List<ImplementedClass> EMPTY_LIST = Lists.newArrayList();
/**
- * The kind of the region.
- */
- private final String kind;
-
- /**
- * The offset of the region to be folded.
+ * The offset of the name of the implemented class.
*/
private final int offset;
/**
- * The length of the region to be folded.
+ * The length of the name of the implemented class.
*/
private final int length;
/**
- * Constructor for {@link FoldingRegion}.
+ * Constructor for {@link ImplementedClass}.
*/
- public FoldingRegion(String kind, int offset, int length) {
- this.kind = kind;
+ public ImplementedClass(int offset, int length) {
this.offset = offset;
this.length = length;
}
@Override
public boolean equals(Object obj) {
- if (obj instanceof FoldingRegion) {
- FoldingRegion other = (FoldingRegion) obj;
+ if (obj instanceof ImplementedClass) {
+ ImplementedClass other = (ImplementedClass) obj;
return
- ObjectUtilities.equals(other.kind, kind) &&
other.offset == offset &&
other.length == length;
}
return false;
}
- public static FoldingRegion fromJson(JsonObject jsonObject) {
- String kind = jsonObject.get("kind").getAsString();
+ public static ImplementedClass fromJson(JsonObject jsonObject) {
int offset = jsonObject.get("offset").getAsInt();
int length = jsonObject.get("length").getAsInt();
- return new FoldingRegion(kind, offset, length);
+ return new ImplementedClass(offset, length);
}
- public static List<FoldingRegion> fromJsonArray(JsonArray jsonArray) {
+ public static List<ImplementedClass> fromJsonArray(JsonArray jsonArray) {
if (jsonArray == null) {
return EMPTY_LIST;
}
- ArrayList<FoldingRegion> list = new ArrayList<FoldingRegion>(jsonArray.size());
+ ArrayList<ImplementedClass> list = new ArrayList<ImplementedClass>(jsonArray.size());
Iterator<JsonElement> iterator = jsonArray.iterator();
while (iterator.hasNext()) {
list.add(fromJson(iterator.next().getAsJsonObject()));
@@ -99,21 +91,14 @@ public class FoldingRegion {
}
/**
- * The kind of the region.
- */
- public String getKind() {
- return kind;
- }
-
- /**
- * The length of the region to be folded.
+ * The length of the name of the implemented class.
*/
public int getLength() {
return length;
}
/**
- * The offset of the region to be folded.
+ * The offset of the name of the implemented class.
*/
public int getOffset() {
return offset;
@@ -122,7 +107,6 @@ public class FoldingRegion {
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
- builder.append(kind);
builder.append(offset);
builder.append(length);
return builder.toHashCode();
@@ -130,7 +114,6 @@ public class FoldingRegion {
public JsonObject toJson() {
JsonObject jsonObject = new JsonObject();
- jsonObject.addProperty("kind", kind);
jsonObject.addProperty("offset", offset);
jsonObject.addProperty("length", length);
return jsonObject;
@@ -140,8 +123,6 @@ public class FoldingRegion {
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("[");
- builder.append("kind=");
- builder.append(kind + ", ");
builder.append("offset=");
builder.append(offset + ", ");
builder.append("length=");

Powered by Google App Engine
This is Rietveld 408576698