OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library analysis_server.src.provisional.completion.dart.plugin; | 5 library analysis_server.src.provisional.completion.dart.plugin; |
6 | 6 |
7 import 'package:analysis_server/src/provisional/completion/completion.dart'; | 7 import 'package:analysis_server/src/provisional/completion/completion.dart'; |
8 import 'package:analysis_server/src/provisional/completion/dart/completion.dart'
; | 8 import 'package:analysis_server/src/provisional/completion/dart/completion.dart'
; |
9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | 9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; |
10 import 'package:analysis_server/src/services/completion/dart/arglist_contributor
.dart'; | 10 import 'package:analysis_server/src/services/completion/dart/arglist_contributor
.dart'; |
11 import 'package:analysis_server/src/services/completion/dart/combinator_contribu
tor.dart'; | 11 import 'package:analysis_server/src/services/completion/dart/combinator_contribu
tor.dart'; |
12 import 'package:analysis_server/src/services/completion/dart/completion_manager.
dart'; | 12 import 'package:analysis_server/src/services/completion/dart/completion_manager.
dart'; |
13 import 'package:analysis_server/src/services/completion/dart/field_formal_contri
butor.dart'; | 13 import 'package:analysis_server/src/services/completion/dart/field_formal_contri
butor.dart'; |
14 import 'package:analysis_server/src/services/completion/dart/keyword_contributor
.dart'; | 14 import 'package:analysis_server/src/services/completion/dart/keyword_contributor
.dart'; |
| 15 import 'package:analysis_server/src/services/completion/dart/label_contributor.d
art'; |
15 import 'package:analysis_server/src/services/completion/dart/library_member_cont
ributor.dart'; | 16 import 'package:analysis_server/src/services/completion/dart/library_member_cont
ributor.dart'; |
16 import 'package:analysis_server/src/services/completion/dart/library_prefix_cont
ributor.dart'; | 17 import 'package:analysis_server/src/services/completion/dart/library_prefix_cont
ributor.dart'; |
17 import 'package:analysis_server/src/services/completion/dart/named_constructor_c
ontributor.dart'; | 18 import 'package:analysis_server/src/services/completion/dart/named_constructor_c
ontributor.dart'; |
18 import 'package:analysis_server/src/services/completion/dart/static_member_contr
ibutor.dart'; | 19 import 'package:analysis_server/src/services/completion/dart/static_member_contr
ibutor.dart'; |
19 import 'package:analysis_server/src/services/completion/dart/type_member_contrib
utor.dart'; | 20 import 'package:analysis_server/src/services/completion/dart/type_member_contrib
utor.dart'; |
20 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar
t'; | 21 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar
t'; |
21 import 'package:plugin/plugin.dart'; | 22 import 'package:plugin/plugin.dart'; |
22 | 23 |
23 /** | 24 /** |
24 * The shared dart completion plugin instance. | 25 * The shared dart completion plugin instance. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // | 76 // |
76 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 77 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
77 () => new ArgListContributor()); | 78 () => new ArgListContributor()); |
78 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 79 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
79 () => new CombinatorContributor()); | 80 () => new CombinatorContributor()); |
80 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 81 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
81 () => new FieldFormalContributor()); | 82 () => new FieldFormalContributor()); |
82 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 83 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
83 () => new KeywordContributor()); | 84 () => new KeywordContributor()); |
84 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 85 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
| 86 () => new LabelContributor()); |
| 87 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
85 () => new LibraryMemberContributor()); | 88 () => new LibraryMemberContributor()); |
86 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 89 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
87 () => new LibraryPrefixContributor()); | 90 () => new LibraryPrefixContributor()); |
88 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 91 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
89 () => new NamedConstructorContributor()); | 92 () => new NamedConstructorContributor()); |
90 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 93 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
91 () => new StaticMemberContributor()); | 94 () => new StaticMemberContributor()); |
92 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 95 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
93 () => new TypeMemberContributor()); | 96 () => new TypeMemberContributor()); |
94 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 97 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
95 () => new UriContributor()); | 98 () => new UriContributor()); |
96 } | 99 } |
97 | 100 |
98 /** | 101 /** |
99 * Validate the given extension by throwing an [ExtensionError] if it is not a | 102 * Validate the given extension by throwing an [ExtensionError] if it is not a |
100 * valid Dart specific completion contributor. | 103 * valid Dart specific completion contributor. |
101 */ | 104 */ |
102 void _validateDartCompletionContributorExtension(Object extension) { | 105 void _validateDartCompletionContributorExtension(Object extension) { |
103 if (extension is! DartCompletionContributorFactory) { | 106 if (extension is! DartCompletionContributorFactory) { |
104 String id = _contributorExtensionPoint.uniqueIdentifier; | 107 String id = _contributorExtensionPoint.uniqueIdentifier; |
105 throw new ExtensionError( | 108 throw new ExtensionError( |
106 'Extensions to $id must be a DartCompletionContributorFactory'); | 109 'Extensions to $id must be a DartCompletionContributorFactory'); |
107 } | 110 } |
108 } | 111 } |
109 } | 112 } |
OLD | NEW |