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

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

Issue 304323004: Computers and services snapshot. (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 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This code was auto-generated, is not intended to be edited, and is subject to 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. 6 // significant change. Please see the README file for more information.
7 7
8 library service.interfaces; 8 library service.interfaces;
9 9
10 import 'package:analyzer/src/generated/java_core.dart' show Enum, StringUtils; 10 import 'package:analyzer/src/generated/java_core.dart' show Enum, StringUtils;
11 import 'package:analyzer/src/generated/source.dart' show Source; 11 import 'package:analyzer/src/generated/source.dart' show Source;
12 import 'package:analysis_services/src/generated/proposal.dart'; 12 import 'package:analysis_services/src/generated/change.dart' show SourceChange;
13
14 /**
15 * The interface `AssistsConsumer` defines the behavior of objects that consume assists
16 * [SourceChange]s.
17 */
18 abstract class AssistsConsumer implements Consumer {
19 /**
20 * A set of [SourceChange]s that have been computed.
21 *
22 * @param proposals an array of computed [SourceChange]s
23 * @param isLastResult is `true` if this is the last set of results
24 */
25 void computedSourceChanges(List<SourceChange> sourceChanges, bool isLastResult );
26 }
27
28 /**
29 * The interface `CompletionSuggestion` defines the behavior of objects represen ting a
30 * completion suggestions.
31 */
32 abstract class CompletionSuggestion {
33 static final int RELEVANCE_LOW = 0;
34
35 static final int RELEVANCE_DEFAULT = 10;
36
37 static final int RELEVANCE_HIGH = 20;
38
39 /**
40 * An empty array of suggestions.
41 */
42 static final List<CompletionSuggestion> EMPTY_ARRAY = new List<CompletionSugge stion>(0);
43
44 /**
45 * This character is used to specify location of the cursor after completion.
46 */
47 static final int CURSOR_MARKER = 0x2758;
48
49 String get completion;
50
51 String get declaringType;
52
53 String get elementDocDetails;
54
55 String get elementDocSummary;
56
57 CompletionSuggestionKind get kind;
58
59 int get location;
60
61 String get parameterName;
62
63 List<String> get parameterNames;
64
65 String get parameterType;
66
67 List<String> get parameterTypes;
68
69 int get positionalParameterCount;
70
71 int get relevance;
72
73 int get replacementLength;
74
75 int get replacementLengthIdentifier;
76
77 String get returnType;
78
79 bool get hasNamed;
80
81 bool get hasPositional;
82
83 bool get isDeprecated;
84
85 bool get isPotentialMatch;
86 }
87
88 /**
89 * The various kinds of completion proposals. Each specifies the kind of complet ion to be created,
90 * corresponding to different syntactical elements.
91 */
92 class CompletionSuggestionKind extends Enum<CompletionSuggestionKind> {
93 static const CompletionSuggestionKind NONE = const CompletionSuggestionKind('N ONE', 0);
94
95 static const CompletionSuggestionKind CLASS = const CompletionSuggestionKind(' CLASS', 1);
96
97 static const CompletionSuggestionKind CLASS_ALIAS = const CompletionSuggestion Kind('CLASS_ALIAS', 2);
98
99 static const CompletionSuggestionKind CONSTRUCTOR = const CompletionSuggestion Kind('CONSTRUCTOR', 3);
100
101 static const CompletionSuggestionKind FIELD = const CompletionSuggestionKind(' FIELD', 4);
102
103 static const CompletionSuggestionKind FUNCTION = const CompletionSuggestionKin d('FUNCTION', 5);
104
105 static const CompletionSuggestionKind FUNCTION_ALIAS = const CompletionSuggest ionKind('FUNCTION_ALIAS', 6);
106
107 static const CompletionSuggestionKind GETTER = const CompletionSuggestionKind( 'GETTER', 7);
108
109 static const CompletionSuggestionKind IMPORT = const CompletionSuggestionKind( 'IMPORT', 8);
110
111 static const CompletionSuggestionKind LIBRARY_PREFIX = const CompletionSuggest ionKind('LIBRARY_PREFIX', 9);
112
113 static const CompletionSuggestionKind METHOD = const CompletionSuggestionKind( 'METHOD', 10);
114
115 static const CompletionSuggestionKind METHOD_NAME = const CompletionSuggestion Kind('METHOD_NAME', 11);
116
117 static const CompletionSuggestionKind PARAMETER = const CompletionSuggestionKi nd('PARAMETER', 12);
118
119 static const CompletionSuggestionKind SETTER = const CompletionSuggestionKind( 'SETTER', 13);
120
121 static const CompletionSuggestionKind VARIABLE = const CompletionSuggestionKin d('VARIABLE', 14);
122
123 static const CompletionSuggestionKind TYPE_PARAMETER = const CompletionSuggest ionKind('TYPE_PARAMETER', 15);
124
125 static const CompletionSuggestionKind ARGUMENT_LIST = const CompletionSuggesti onKind('ARGUMENT_LIST', 16);
126
127 static const CompletionSuggestionKind OPTIONAL_ARGUMENT = const CompletionSugg estionKind('OPTIONAL_ARGUMENT', 17);
128
129 static const CompletionSuggestionKind NAMED_ARGUMENT = const CompletionSuggest ionKind('NAMED_ARGUMENT', 18);
130
131 static const List<CompletionSuggestionKind> values = const [
132 NONE,
133 CLASS,
134 CLASS_ALIAS,
135 CONSTRUCTOR,
136 FIELD,
137 FUNCTION,
138 FUNCTION_ALIAS,
139 GETTER,
140 IMPORT,
141 LIBRARY_PREFIX,
142 METHOD,
143 METHOD_NAME,
144 PARAMETER,
145 SETTER,
146 VARIABLE,
147 TYPE_PARAMETER,
148 ARGUMENT_LIST,
149 OPTIONAL_ARGUMENT,
150 NAMED_ARGUMENT];
151
152 const CompletionSuggestionKind(String name, int ordinal) : super(name, ordinal );
153 }
154
155 /**
156 * The interface `Consumer` is a marker interface for all consumers interfaces.
157 */
158 abstract class Consumer {
159 }
13 160
14 /** 161 /**
15 * The interface `Element` defines the behavior of objects that represent an inf ormation for 162 * The interface `Element` defines the behavior of objects that represent an inf ormation for
16 * an element. 163 * an element.
17 */ 164 */
18 abstract class Element { 165 abstract class Element {
19 /** 166 /**
20 * An empty array of elements. 167 * An empty array of elements.
21 */ 168 */
22 static final List<Element> EMPTY_ARRAY = new List<Element>(0); 169 static final List<Element> EMPTY_ARRAY = new List<Element>(0);
23 170
24 /** 171 /**
172 * Return the id of the context this element is created in.
173 *
174 * @return the id of the context
175 */
176 String get contextId;
177
178 /**
25 * Return the id of the element, may be `null` if there is no resolution infor mation 179 * Return the id of the element, may be `null` if there is no resolution infor mation
26 * associated with this element. 180 * associated with this element.
27 * 181 *
28 * @return the id of the element 182 * @return the id of the element
29 */ 183 */
30 String get id; 184 String get id;
31 185
32 /** 186 /**
33 * Return the kind of the element. 187 * Return the kind of the element.
34 * 188 *
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 ListSourceSet(this.sources); 462 ListSourceSet(this.sources);
309 463
310 @override 464 @override
311 SourceSetKind get kind => SourceSetKind.LIST; 465 SourceSetKind get kind => SourceSetKind.LIST;
312 466
313 @override 467 @override
314 String toString() => "[${StringUtils.join(sources, ", ")}]"; 468 String toString() => "[${StringUtils.join(sources, ", ")}]";
315 } 469 }
316 470
317 /** 471 /**
318 * The interface `MinorRefactoringsConsumer` defines the behavior of objects tha t consume
319 * minor refactorings [CorrectionProposal]s.
320 */
321 abstract class MinorRefactoringsConsumer {
322 /**
323 * A set [CorrectionProposal]s has been computed.
324 *
325 * @param proposals an array of computed [CorrectionProposal]s
326 * @param isLastResult is `true` if this is the last set of results
327 */
328 void computedProposals(List<CorrectionProposal> proposals, bool isLastResult);
329 }
330
331 /**
332 * The interface `NavigationRegion` defines the behavior of objects representing a list of 472 * The interface `NavigationRegion` defines the behavior of objects representing a list of
333 * elements with which a source region is associated. 473 * elements with which a source region is associated.
334 */ 474 */
335 abstract class NavigationRegion implements SourceRegion { 475 abstract class NavigationRegion implements SourceRegion {
336 /** 476 /**
337 * An empty array of navigation regions. 477 * An empty array of navigation regions.
338 */ 478 */
339 static final List<NavigationRegion> EMPTY_ARRAY = new List<NavigationRegion>(0 ); 479 static final List<NavigationRegion> EMPTY_ARRAY = new List<NavigationRegion>(0 );
340 480
341 /** 481 /**
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 * @return the path to this result 583 * @return the path to this result
444 */ 584 */
445 List<Element> get path; 585 List<Element> get path;
446 586
447 /** 587 /**
448 * Return the source containing the result. 588 * Return the source containing the result.
449 * 589 *
450 * @return the source containing the result 590 * @return the source containing the result
451 */ 591 */
452 Source get source; 592 Source get source;
593
594 /**
595 * Return `true` is this search result is a potential reference to a class mem ber.
596 *
597 * @return `true` is this search result is a potential reference to a class me mber
598 */
599 bool get isPotential;
453 } 600 }
454 601
455 /** 602 /**
456 * The enumeration `SearchResultKind` defines the various kinds of [SearchResult ]. 603 * The enumeration `SearchResultKind` defines the various kinds of [SearchResult ].
457 */ 604 */
458 class SearchResultKind extends Enum<SearchResultKind> { 605 class SearchResultKind extends Enum<SearchResultKind> {
459 /** 606 /**
607 * A declaration of a class.
608 */
609 static const SearchResultKind CLASS_DECLARATION = const SearchResultKind('CLAS S_DECLARATION', 0);
610
611 /**
612 * A declaration of a class member.
613 */
614 static const SearchResultKind CLASS_MEMBER_DECLARATION = const SearchResultKin d('CLASS_MEMBER_DECLARATION', 1);
615
616 /**
460 * A reference to a constructor. 617 * A reference to a constructor.
461 */ 618 */
462 static const SearchResultKind CONSTRUCTOR_REFERENCE = const SearchResultKind(' CONSTRUCTOR_REFERENCE', 0); 619 static const SearchResultKind CONSTRUCTOR_REFERENCE = const SearchResultKind(' CONSTRUCTOR_REFERENCE', 2);
463 620
464 /** 621 /**
465 * A reference to a field (from field formal parameter). 622 * A reference to a field (from field formal parameter).
466 */ 623 */
467 static const SearchResultKind FIELD_REFERENCE = const SearchResultKind('FIELD_ REFERENCE', 1); 624 static const SearchResultKind FIELD_REFERENCE = const SearchResultKind('FIELD_ REFERENCE', 3);
468 625
469 /** 626 /**
470 * A reference to a field in which it is read. 627 * A reference to a field in which it is read.
471 */ 628 */
472 static const SearchResultKind FIELD_READ = const SearchResultKind('FIELD_READ' , 2); 629 static const SearchResultKind FIELD_READ = const SearchResultKind('FIELD_READ' , 4);
630
631 /**
632 * A reference to a field in which it is read and written.
633 */
634 static const SearchResultKind FIELD_READ_WRITE = const SearchResultKind('FIELD _READ_WRITE', 5);
473 635
474 /** 636 /**
475 * A reference to a field in which it is written. 637 * A reference to a field in which it is written.
476 */ 638 */
477 static const SearchResultKind FIELD_WRITE = const SearchResultKind('FIELD_WRIT E', 3); 639 static const SearchResultKind FIELD_WRITE = const SearchResultKind('FIELD_WRIT E', 6);
640
641 /**
642 * A declaration of a function.
643 */
644 static const SearchResultKind FUNCTION_DECLARATION = const SearchResultKind('F UNCTION_DECLARATION', 7);
478 645
479 /** 646 /**
480 * A reference to a function in which it is invoked. 647 * A reference to a function in which it is invoked.
481 */ 648 */
482 static const SearchResultKind FUNCTION_INVOCATION = const SearchResultKind('FU NCTION_INVOCATION', 4); 649 static const SearchResultKind FUNCTION_INVOCATION = const SearchResultKind('FU NCTION_INVOCATION', 8);
483 650
484 /** 651 /**
485 * A reference to a function in which it is referenced. 652 * A reference to a function in which it is referenced.
486 */ 653 */
487 static const SearchResultKind FUNCTION_REFERENCE = const SearchResultKind('FUN CTION_REFERENCE', 5); 654 static const SearchResultKind FUNCTION_REFERENCE = const SearchResultKind('FUN CTION_REFERENCE', 9);
655
656 /**
657 * A declaration of a function type.
658 */
659 static const SearchResultKind FUNCTION_TYPE_DECLARATION = const SearchResultKi nd('FUNCTION_TYPE_DECLARATION', 10);
488 660
489 /** 661 /**
490 * A reference to a method in which it is invoked. 662 * A reference to a method in which it is invoked.
491 */ 663 */
492 static const SearchResultKind METHOD_INVOCATION = const SearchResultKind('METH OD_INVOCATION', 6); 664 static const SearchResultKind METHOD_INVOCATION = const SearchResultKind('METH OD_INVOCATION', 11);
493 665
494 /** 666 /**
495 * A reference to a method in which it is referenced. 667 * A reference to a method in which it is referenced.
496 */ 668 */
497 static const SearchResultKind METHOD_REFERENCE = const SearchResultKind('METHO D_REFERENCE', 7); 669 static const SearchResultKind METHOD_REFERENCE = const SearchResultKind('METHO D_REFERENCE', 12);
670
671 /**
672 * A reference to a name, resolved.
673 */
674 static const SearchResultKind NAME_REFERENCE_RESOLVED = const SearchResultKind ('NAME_REFERENCE_RESOLVED', 13);
675
676 /**
677 * A reference to a name, unresolved.
678 */
679 static const SearchResultKind NAME_REFERENCE_UNRESOLVED = const SearchResultKi nd('NAME_REFERENCE_UNRESOLVED', 14);
498 680
499 /** 681 /**
500 * A reference to a property accessor. 682 * A reference to a property accessor.
501 */ 683 */
502 static const SearchResultKind PROPERTY_ACCESSOR_REFERENCE = const SearchResult Kind('PROPERTY_ACCESSOR_REFERENCE', 8); 684 static const SearchResultKind PROPERTY_ACCESSOR_REFERENCE = const SearchResult Kind('PROPERTY_ACCESSOR_REFERENCE', 15);
503 685
504 /** 686 /**
505 * A reference to a type. 687 * A reference to a type.
506 */ 688 */
507 static const SearchResultKind TYPE_REFERENCE = const SearchResultKind('TYPE_RE FERENCE', 9); 689 static const SearchResultKind TYPE_REFERENCE = const SearchResultKind('TYPE_RE FERENCE', 16);
508 690
509 /** 691 /**
510 * A declaration of a variable. 692 * A declaration of a variable.
511 */ 693 */
512 static const SearchResultKind VARIABLE_DECLARATION = const SearchResultKind('V ARIABLE_DECLARATION', 10); 694 static const SearchResultKind VARIABLE_DECLARATION = const SearchResultKind('V ARIABLE_DECLARATION', 17);
513 695
514 /** 696 /**
515 * A reference to a variable in which it is read. 697 * A reference to a variable in which it is read.
516 */ 698 */
517 static const SearchResultKind VARIABLE_READ = const SearchResultKind('VARIABLE _READ', 11); 699 static const SearchResultKind VARIABLE_READ = const SearchResultKind('VARIABLE _READ', 18);
518 700
519 /** 701 /**
520 * A reference to a variable in which it is both read and written. 702 * A reference to a variable in which it is both read and written.
521 */ 703 */
522 static const SearchResultKind VARIABLE_READ_WRITE = const SearchResultKind('VA RIABLE_READ_WRITE', 12); 704 static const SearchResultKind VARIABLE_READ_WRITE = const SearchResultKind('VA RIABLE_READ_WRITE', 19);
523 705
524 /** 706 /**
525 * A reference to a variable in which it is written. 707 * A reference to a variable in which it is written.
526 */ 708 */
527 static const SearchResultKind VARIABLE_WRITE = const SearchResultKind('VARIABL E_WRITE', 13); 709 static const SearchResultKind VARIABLE_WRITE = const SearchResultKind('VARIABL E_WRITE', 20);
528 710
529 static const List<SearchResultKind> values = const [ 711 static const List<SearchResultKind> values = const [
712 CLASS_DECLARATION,
713 CLASS_MEMBER_DECLARATION,
530 CONSTRUCTOR_REFERENCE, 714 CONSTRUCTOR_REFERENCE,
531 FIELD_REFERENCE, 715 FIELD_REFERENCE,
532 FIELD_READ, 716 FIELD_READ,
717 FIELD_READ_WRITE,
533 FIELD_WRITE, 718 FIELD_WRITE,
719 FUNCTION_DECLARATION,
534 FUNCTION_INVOCATION, 720 FUNCTION_INVOCATION,
535 FUNCTION_REFERENCE, 721 FUNCTION_REFERENCE,
722 FUNCTION_TYPE_DECLARATION,
536 METHOD_INVOCATION, 723 METHOD_INVOCATION,
537 METHOD_REFERENCE, 724 METHOD_REFERENCE,
725 NAME_REFERENCE_RESOLVED,
726 NAME_REFERENCE_UNRESOLVED,
538 PROPERTY_ACCESSOR_REFERENCE, 727 PROPERTY_ACCESSOR_REFERENCE,
539 TYPE_REFERENCE, 728 TYPE_REFERENCE,
540 VARIABLE_DECLARATION, 729 VARIABLE_DECLARATION,
541 VARIABLE_READ, 730 VARIABLE_READ,
542 VARIABLE_READ_WRITE, 731 VARIABLE_READ_WRITE,
543 VARIABLE_WRITE]; 732 VARIABLE_WRITE];
544 733
545 const SearchResultKind(String name, int ordinal) : super(name, ordinal); 734 const SearchResultKind(String name, int ordinal) : super(name, ordinal);
546 } 735 }
547 736
548 /** 737 /**
549 * The interface `SearchReferencesConsumer` defines the behavior of objects that consume 738 * The interface `SearchReferencesConsumer` defines the behavior of objects that consume
550 * [SearchResult]s. 739 * [SearchResult]s.
551 */ 740 */
552 abstract class SearchResultsConsumer { 741 abstract class SearchResultsConsumer implements Consumer {
553 /** 742 /**
554 * [SearchResult]s have been computed. 743 * [SearchResult]s have been computed.
555 * 744 *
556 * @param contextId the identifier of the context to search within 745 * @param contextId the identifier of the context to search within
557 * @param source the [Source] with element
558 * @param offset the offset within the `source`
559 * @param searchResults an array of [SearchResult]s computed so far 746 * @param searchResults an array of [SearchResult]s computed so far
560 * @param isLastResult is `true` if this is the last set of results 747 * @param isLastResult is `true` if this is the last set of results
561 */ 748 */
562 void computedReferences(String contextId, Source source, int offset, List<Sear chResult> searchResults, bool isLastResult); 749 void computed(List<SearchResult> searchResults, bool isLastResult);
563 } 750 }
564 751
565 /** 752 /**
566 * The interface `SourceRegion` defines the behavior of objects representing a r ange of 753 * The interface `SourceRegion` defines the behavior of objects representing a r ange of
567 * characters within a [Source]. 754 * characters within a [Source].
568 */ 755 */
569 abstract class SourceRegion { 756 abstract class SourceRegion {
570 /** 757 /**
571 * Check if <code>x</code> is in [offset, offset + length] interval. 758 * Check if <code>x</code> is in [offset, offset + length] interval.
572 */ 759 */
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 static const SourceSetKind EXPLICITLY_ADDED = const SourceSetKind('EXPLICITLY_ ADDED', 2); 817 static const SourceSetKind EXPLICITLY_ADDED = const SourceSetKind('EXPLICITLY_ ADDED', 2);
631 818
632 static const SourceSetKind LIST = const SourceSetKind('LIST', 3); 819 static const SourceSetKind LIST = const SourceSetKind('LIST', 3);
633 820
634 static const List<SourceSetKind> values = const [ALL, NON_SDK, EXPLICITLY_ADDE D, LIST]; 821 static const List<SourceSetKind> values = const [ALL, NON_SDK, EXPLICITLY_ADDE D, LIST];
635 822
636 const SourceSetKind(String name, int ordinal) : super(name, ordinal); 823 const SourceSetKind(String name, int ordinal) : super(name, ordinal);
637 } 824 }
638 825
639 /** 826 /**
827 * The interface `TypeHierarchyItem` defines the behavior of objects representin g an item in a
828 * type hierarchy.
829 */
830 abstract class TypeHierarchyItem {
831 /**
832 * An empty array of hierarchy items.
833 */
834 static final List<TypeHierarchyItem> EMPTY_ARRAY = new List<TypeHierarchyItem> (0);
835
836 /**
837 * Return the class element associated with this item. Not `null`.
838 *
839 * @return the class element associated with this item
840 */
841 Element get classElement;
842
843 /**
844 * Return the type that is extended by this type, `null` if this item is `Obje ct`.
845 *
846 * @return the type that is extended by this type
847 */
848 TypeHierarchyItem get extendedType;
849
850 /**
851 * Return the types that are implemented by this type, `null` if not a super i tem.
852 *
853 * @return the types that are implemented by this type
854 */
855 List<TypeHierarchyItem> get implementedTypes;
856
857 /**
858 * Return the member element associated with this item. May be `null` if this type does not
859 * define the member which hierarchy is requested.
860 *
861 * @return the member element associated with this item
862 */
863 Element get memberElement;
864
865 /**
866 * Return the types that are mixed into this type, `null` if not a super item.
867 *
868 * @return the types that are mixed into this type
869 */
870 List<TypeHierarchyItem> get mixedTypes;
871
872 /**
873 * Return the display name of this item.
874 *
875 * @return the display name of this item
876 */
877 String get name;
878
879 /**
880 * Return the subtypes of this type, may be empty, but not `null`.
881 *
882 * @return the subtypes of this type
883 */
884 List<TypeHierarchyItem> get subTypes;
885 }
886
887 /**
640 * An implementation of [SourceSet] for some [SourceSetKind]. 888 * An implementation of [SourceSet] for some [SourceSetKind].
641 */ 889 */
642 class _ImplicitSourceSet implements SourceSet { 890 class _ImplicitSourceSet implements SourceSet {
643 final SourceSetKind kind; 891 final SourceSetKind kind;
644 892
645 _ImplicitSourceSet(this.kind); 893 _ImplicitSourceSet(this.kind);
646 894
647 @override 895 @override
648 List<Source> get sources => Source.EMPTY_ARRAY; 896 List<Source> get sources => Source.EMPTY_ARRAY;
649 897
650 @override 898 @override
651 String toString() => kind.toString(); 899 String toString() => kind.toString();
652 } 900 }
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