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

Side by Side Diff: pkg/analysis_server/lib/src/generated/service_interfaces.dart

Issue 242373005: Translate server interfaces and navigation/outline computers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information.
7
8 library service.interfaces;
9
10 import 'package:analyzer/src/generated/java_core.dart' show Enum;
11 import 'package:analyzer/src/generated/source.dart' show Source;
12
13 /**
14 * The interface `HighlightRegion` defines the behavior of objects representing a particular
15 * syntactic or semantic meaning associated with a source region.
16 */
17 abstract class HighlightRegion implements SourceRegion {
18 /**
19 * Return the type of highlight associated with the region.
20 *
21 * @return the type of highlight associated with the region
22 */
23 HighlightType get type;
24 }
25
26 /**
27 * The interface `NavigationTarget` defines the behavior of objects that provide information
28 * about the target of a navigation region.
29 */
30 abstract class NavigationTarget {
31 /**
32 * Return the id of the element to which this target will navigate.
33 *
34 * @return the id of the element to which this target will navigate
35 */
36 String get elementId;
37
38 /**
39 * Return the length of the region to which the target will navigate.
40 *
41 * @return the length of the region to which the target will navigate
42 */
43 int get length;
44
45 /**
46 * Return the offset to the region to which the target will navigate.
47 *
48 * @return the offset to the region to which the target will navigate
49 */
50 int get offset;
51
52 /**
53 * Return the source containing the element to which this target will navigate .
54 *
55 * @return the source containing the element to which this target will navigat e
56 */
57 Source get source;
58 }
59
60 /**
61 * The enumeration `OutlineKind` defines the various kinds of [Outline] items.
62 */
63 class OutlineKind extends Enum<OutlineKind> {
64 static const OutlineKind CLASS = const OutlineKind('CLASS', 0);
65
66 static const OutlineKind CLASS_TYPE_ALIAS = const OutlineKind('CLASS_TYPE_ALIA S', 1);
67
68 static const OutlineKind CONSTRUCTOR = const OutlineKind('CONSTRUCTOR', 2);
69
70 static const OutlineKind GETTER = const OutlineKind('GETTER', 3);
71
72 static const OutlineKind FIELD = const OutlineKind('FIELD', 4);
73
74 static const OutlineKind FUNCTION = const OutlineKind('FUNCTION', 5);
75
76 static const OutlineKind FUNCTION_TYPE_ALIAS = const OutlineKind('FUNCTION_TYP E_ALIAS', 6);
77
78 static const OutlineKind METHOD = const OutlineKind('METHOD', 7);
79
80 static const OutlineKind SETTER = const OutlineKind('SETTER', 8);
81
82 static const OutlineKind TOP_LEVEL_VARIABLE = const OutlineKind('TOP_LEVEL_VAR IABLE', 9);
83
84 static const OutlineKind COMPILATION_UNIT = const OutlineKind('COMPILATION_UNI T', 10);
85
86 static const List<OutlineKind> values = const [
87 CLASS,
88 CLASS_TYPE_ALIAS,
89 CONSTRUCTOR,
90 GETTER,
91 FIELD,
92 FUNCTION,
93 FUNCTION_TYPE_ALIAS,
94 METHOD,
95 SETTER,
96 TOP_LEVEL_VARIABLE,
97 COMPILATION_UNIT];
98
99 const OutlineKind(String name, int ordinal) : super(name, ordinal);
100 }
101
102 /**
103 * The interface `SourceSet` defines the behavior of objects that represent a se t of
104 * [Source]s.
105 */
106 abstract class SourceSet {
107 /**
108 * An instance of [SourceSet] for [SourceSetKind#ALL].
109 */
110 static final SourceSet ALL = new _ImplicitSourceSet(SourceSetKind.ALL);
111
112 /**
113 * An instance of [SourceSet] for [SourceSetKind#NON_SDK].
114 */
115 static final SourceSet NON_SDK = new _ImplicitSourceSet(SourceSetKind.NON_SDK) ;
116
117 /**
118 * An instance of [SourceSet] for [SourceSetKind#EXPLICITLY_ADDED].
119 */
120 static final SourceSet EXPLICITLY_ADDED = new _ImplicitSourceSet(SourceSetKind .EXPLICITLY_ADDED);
121
122 /**
123 * Return the kind of the this source set.
124 */
125 SourceSetKind get kind;
126
127 /**
128 * Returns [Source]s that belong to this source set, if [SourceSetKind#LIST] i s used;
129 * an empty array otherwise.
130 */
131 List<Source> get sources;
132 }
133
134 /**
135 * The enumeration `SourceSetKind` defines the kinds of [SourceSet]s.
136 */
137 class SourceSetKind extends Enum<SourceSetKind> {
138 static const SourceSetKind ALL = const SourceSetKind('ALL', 0);
139
140 static const SourceSetKind NON_SDK = const SourceSetKind('NON_SDK', 1);
141
142 static const SourceSetKind EXPLICITLY_ADDED = const SourceSetKind('EXPLICITLY_ ADDED', 2);
143
144 static const SourceSetKind LIST = const SourceSetKind('LIST', 3);
145
146 static const List<SourceSetKind> values = const [ALL, NON_SDK, EXPLICITLY_ADDE D, LIST];
147
148 const SourceSetKind(String name, int ordinal) : super(name, ordinal);
149 }
150
151 /**
152 * The interface `SourceRegion` defines the behavior of objects representing a r ange of
153 * characters within a [Source].
154 */
155 abstract class SourceRegion {
156 /**
157 * Check if <code>x</code> is in [offset, offset + length] interval.
158 */
159 bool containsInclusive(int x);
160
161 /**
162 * Return the length of the region.
163 *
164 * @return the length of the region
165 */
166 int get length;
167
168 /**
169 * Return the offset to the beginning of the region.
170 *
171 * @return the offset to the beginning of the region
172 */
173 int get offset;
174 }
175
176 /**
177 * The enumeration `NotificationKind` defines the kinds of notification clients may subscribe
178 * for.
179 */
180 class NotificationKind extends Enum<NotificationKind> {
181 static const NotificationKind ERRORS = const NotificationKind('ERRORS', 0);
182
183 static const NotificationKind HIGHLIGHT = const NotificationKind('HIGHLIGHT', 1);
184
185 static const NotificationKind NAVIGATION = const NotificationKind('NAVIGATION' , 2);
186
187 static const NotificationKind OUTLINE = const NotificationKind('OUTLINE', 3);
188
189 static const List<NotificationKind> values = const [ERRORS, HIGHLIGHT, NAVIGAT ION, OUTLINE];
190
191 const NotificationKind(String name, int ordinal) : super(name, ordinal);
192 }
193
194 /**
195 * The interface `NavigationRegion` defines the behavior of objects representing a list of
196 * elements with which a source region is associated.
197 */
198 abstract class NavigationRegion implements SourceRegion {
199 /**
200 * An empty array of navigation regions.
201 */
202 static final List<NavigationRegion> EMPTY_ARRAY = new List<NavigationRegion>(0 );
203
204 /**
205 * Return the identifiers of the elements associated with the region.
206 *
207 * @return the identifiers of the elements associated with the region
208 */
209 List<NavigationTarget> get targets;
210 }
211
212 /**
213 * An implementation of [SourceSet] for some [SourceSetKind].
214 */
215 class _ImplicitSourceSet implements SourceSet {
216 final SourceSetKind kind;
217
218 _ImplicitSourceSet(this.kind);
219
220 @override
221 List<Source> get sources => Source.EMPTY_ARRAY;
222
223 @override
224 String toString() => kind.toString();
225 }
226
227 /**
228 * The enumeration `HighlightType` defines the kinds of highlighting that can be associated
229 * with a region of text.
230 */
231 class HighlightType extends Enum<HighlightType> {
232 static const HighlightType COMMENT_BLOCK = const HighlightType('COMMENT_BLOCK' , 0);
233
234 static const HighlightType COMMENT_DOCUMENTATION = const HighlightType('COMMEN T_DOCUMENTATION', 1);
235
236 static const HighlightType COMMENT_END_OF_LINE = const HighlightType('COMMENT_ END_OF_LINE', 2);
237
238 static const HighlightType KEYWORD = const HighlightType('KEYWORD', 3);
239
240 static const HighlightType LITERAL_BOOLEAN = const HighlightType('LITERAL_BOOL EAN', 4);
241
242 static const HighlightType LITERAL_DOUBLE = const HighlightType('LITERAL_DOUBL E', 5);
243
244 static const HighlightType LITERAL_INTEGER = const HighlightType('LITERAL_INTE GER', 6);
245
246 static const HighlightType LITERAL_LIST = const HighlightType('LITERAL_LIST', 7);
247
248 static const HighlightType LITERAL_MAP = const HighlightType('LITERAL_MAP', 8) ;
249
250 static const HighlightType LITERAL_STRING = const HighlightType('LITERAL_STRIN G', 9);
251
252 static const List<HighlightType> values = const [
253 COMMENT_BLOCK,
254 COMMENT_DOCUMENTATION,
255 COMMENT_END_OF_LINE,
256 KEYWORD,
257 LITERAL_BOOLEAN,
258 LITERAL_DOUBLE,
259 LITERAL_INTEGER,
260 LITERAL_LIST,
261 LITERAL_MAP,
262 LITERAL_STRING];
263
264 const HighlightType(String name, int ordinal) : super(name, ordinal);
265 }
266
267 /**
268 * The interface `Outline` defines the behavior of objects that represent an out line for a
269 * single source.
270 */
271 abstract class Outline {
272 /**
273 * An empty array of outlines.
274 */
275 static final List<Outline> EMPTY_ARRAY = new List<Outline>(0);
276
277 /**
278 * Return the argument list for the element, or `null` if the element is not a method or
279 * function. If the element has zero arguments, the string `"()"` will be retu rned.
280 *
281 * @return the argument list for the element
282 */
283 String get arguments;
284
285 /**
286 * Return an array containing the children of the element. The array will be e mpty if the element
287 * has no children.
288 *
289 * @return an array containing the children of the element
290 */
291 List<Outline> get children;
292
293 /**
294 * Return the kind of the element.
295 *
296 * @return the kind of the element
297 */
298 OutlineKind get kind;
299
300 /**
301 * Return the length of the element's name.
302 *
303 * @return the length of the element's name
304 */
305 int get length;
306
307 /**
308 * Return the name of the element.
309 *
310 * @return the name of the element
311 */
312 String get name;
313
314 /**
315 * Return the offset to the beginning of the element's name.
316 *
317 * @return the offset to the beginning of the element's name
318 */
319 int get offset;
320
321 /**
322 * Return the outline that either physically or logically encloses this outlin e. This will be
323 * `null` if this outline is a unit outline.
324 *
325 * @return the outline that encloses this outline
326 */
327 Outline get parent;
328
329 /**
330 * Return the return type of the element, or `null` if the element is not a me thod or
331 * function. If the element does not have a declared return type then an empty string will be
332 * returned.
333 *
334 * @return the return type of the element
335 */
336 String get returnType;
337 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/generated/service_computers.dart ('k') | pkg/analysis_server/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698