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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014, the Dart project authors. 2 * Copyright (c) 2014, the Dart project authors.
3 * 3 *
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except
5 * in compliance with the License. You may obtain a copy of the License at 5 * in compliance with the License. You may obtain a copy of the License at
6 * 6 *
7 * http://www.eclipse.org/legal/epl-v10.html 7 * http://www.eclipse.org/legal/epl-v10.html
8 * 8 *
9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License 9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express
11 * or implied. See the License for the specific language governing permissions a nd limitations under 11 * or implied. See the License for the specific language governing permissions a nd limitations under
12 * the License. 12 * the License.
13 */ 13 */
14 package com.google.dart.server; 14 package com.google.dart.server;
15 15
16 /** 16 /**
17 * The interface {@code Outline} defines the behavior of objects that represent an outline for an 17 * The interface {@code Outline} defines the behavior of objects that represent an outline for an
18 * element. 18 * element.
19 * 19 *
20 * @coverage dart.server 20 * @coverage dart.server
21 */ 21 */
22 public interface Outline extends SourceRegion { 22 public interface Outline {
23 /** 23 /**
24 * An empty array of outlines. 24 * An empty array of outlines.
25 */ 25 */
26 Outline[] EMPTY_ARRAY = new Outline[0]; 26 Outline[] EMPTY_ARRAY = new Outline[0];
27 27
28 /** 28 /**
29 * Return the argument list for the element. If the element is not a method or function this field 29 * Check if <code>offset</code> is in [elementOffset, elementOffset + elementL ength] interval.
30 * will not be defined. If the element has zero arguments, this field will hav e a value of "()". 30 */
31 public boolean containsInclusive(int offset);
32
33 /**
34 * Return the parameter list for the element. If the element is not a method o r function this
35 * field will not be defined. If the element has zero parameters, this field w ill have a value of
36 * "()".
31 * 37 *
32 * @return the argument list for the element 38 * @return the parameter list for the element
33 */ 39 */
34 public String getArguments(); 40 public String getParameters();
35 41
36 /** 42 /**
37 * Return an array containing the children outline. The array will be empty if the outline has no 43 * Return an array containing the children outline. The array will be empty if the outline has no
38 * children. 44 * children.
39 * 45 *
40 * @return an array containing the children of the element 46 * @return an array containing the children of the element
41 */ 47 */
42 public Outline[] getChildren(); 48 public Outline[] getChildren();
43 49
44 /** 50 /**
51 * The length of the element.
52 */
53 public int getElementLength();
54
55 /**
56 * The offset of the first character of the element.
57 */
58 public int getElementOffset();
59
60 /**
45 * Return the kind of the element. 61 * Return the kind of the element.
46 * 62 *
47 * @return the kind of the element 63 * @return the kind of the element
48 */ 64 */
49 public ElementKind getKind(); 65 public ElementKind getKind();
50 66
51 /** 67 /**
52 * Return the name of the element. This is typically used as the label in the outline. 68 * Return the name of the element. This is typically used as the label in the outline.
53 * 69 *
54 * @return the name of the element 70 * @return the name of the element
55 */ 71 */
56 public String getName(); 72 public String getName();
57 73
58 /** 74 /**
75 * The length of the name of the element.
76 */
77 public int getNameLength();
78
79 /**
80 * The offset of the name of the element.
81 */
82 public int getNameOffset();
83
84 /**
59 * Return the outline that either physically or logically encloses this outlin e. This will be 85 * Return the outline that either physically or logically encloses this outlin e. This will be
60 * {@code null} if this outline is a unit outline. 86 * {@code null} if this outline is a unit outline.
61 * 87 *
62 * @return the outline that encloses this outline 88 * @return the outline that encloses this outline
63 */ 89 */
64 public Outline getParent(); 90 public Outline getParent();
65 91
66 /** 92 /**
67 * Return the return type of the element. If the element is not a method or fu nction this field 93 * Return the return type of the element. If the element is not a method or fu nction this field
68 * will not be defined. If the element does not have a declared return type, t his field will 94 * will not be defined. If the element does not have a declared return type, t his field will
(...skipping 20 matching lines...) Expand all
89 115
90 /** 116 /**
91 * True if the element is a static member of a class or is a top-level functio n or field. 117 * True if the element is a static member of a class or is a top-level functio n or field.
92 * 118 *
93 * @return {@code true} if the element is a static member of a class or is a t op-level function or 119 * @return {@code true} if the element is a static member of a class or is a t op-level function or
94 * field 120 * field
95 */ 121 */
96 public boolean isStatic(); 122 public boolean isStatic();
97 123
98 } 124 }
OLDNEW
« 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