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

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/Outline.java

Issue 311053005: Updates for the Outline API and use it in Editor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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.server/src/com/google/dart/server/Outline.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/Outline.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/Outline.java
index 0fe78ed5e8ae4b8ba2db76ab94655ccf765a20c5..07a276c747b41121ae3e24565724d49e2825e914 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/Outline.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/Outline.java
@@ -19,19 +19,25 @@ package com.google.dart.server;
*
* @coverage dart.server
*/
-public interface Outline extends SourceRegion {
+public interface Outline {
/**
* An empty array of outlines.
*/
Outline[] EMPTY_ARRAY = new Outline[0];
/**
- * Return the argument list for the element. If the element is not a method or function this field
- * will not be defined. If the element has zero arguments, this field will have a value of "()".
+ * Check if <code>offset</code> is in [elementOffset, elementOffset + elementLength] interval.
+ */
+ public boolean containsInclusive(int offset);
+
+ /**
+ * Return the parameter list for the element. If the element is not a method or function this
+ * field will not be defined. If the element has zero parameters, this field will have a value of
+ * "()".
*
- * @return the argument list for the element
+ * @return the parameter list for the element
*/
- public String getArguments();
+ public String getParameters();
/**
* Return an array containing the children outline. The array will be empty if the outline has no
@@ -42,6 +48,16 @@ public interface Outline extends SourceRegion {
public Outline[] getChildren();
/**
+ * The length of the element.
+ */
+ public int getElementLength();
+
+ /**
+ * The offset of the first character of the element.
+ */
+ public int getElementOffset();
+
+ /**
* Return the kind of the element.
*
* @return the kind of the element
@@ -56,6 +72,16 @@ public interface Outline extends SourceRegion {
public String getName();
/**
+ * The length of the name of the element.
+ */
+ public int getNameLength();
+
+ /**
+ * The offset of the name of the element.
+ */
+ public int getNameOffset();
+
+ /**
* Return the outline that either physically or logically encloses this outline. This will be
* {@code null} if this outline is a unit outline.
*
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/local/computer/DartUnitOutlineComputer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698