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/label_contributor.d
art'; |
16 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'; |
17 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'; |
18 import 'package:analysis_server/src/services/completion/dart/local_constructor_c
ontributor.dart'; | 18 import 'package:analysis_server/src/services/completion/dart/local_constructor_c
ontributor.dart'; |
| 19 import 'package:analysis_server/src/services/completion/dart/local_library_contr
ibutor.dart'; |
19 import 'package:analysis_server/src/services/completion/dart/local_reference_con
tributor.dart'; | 20 import 'package:analysis_server/src/services/completion/dart/local_reference_con
tributor.dart'; |
20 import 'package:analysis_server/src/services/completion/dart/named_constructor_c
ontributor.dart'; | 21 import 'package:analysis_server/src/services/completion/dart/named_constructor_c
ontributor.dart'; |
21 import 'package:analysis_server/src/services/completion/dart/static_member_contr
ibutor.dart'; | 22 import 'package:analysis_server/src/services/completion/dart/static_member_contr
ibutor.dart'; |
22 import 'package:analysis_server/src/services/completion/dart/type_member_contrib
utor.dart'; | 23 import 'package:analysis_server/src/services/completion/dart/type_member_contrib
utor.dart'; |
23 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar
t'; | 24 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar
t'; |
24 import 'package:plugin/plugin.dart'; | 25 import 'package:plugin/plugin.dart'; |
25 | 26 |
26 /** | 27 /** |
27 * The shared dart completion plugin instance. | 28 * The shared dart completion plugin instance. |
28 */ | 29 */ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 () => new KeywordContributor()); | 87 () => new KeywordContributor()); |
87 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 88 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
88 () => new LabelContributor()); | 89 () => new LabelContributor()); |
89 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 90 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
90 () => new LibraryMemberContributor()); | 91 () => new LibraryMemberContributor()); |
91 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 92 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
92 () => new LibraryPrefixContributor()); | 93 () => new LibraryPrefixContributor()); |
93 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 94 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
94 () => new LocalConstructorContributor()); | 95 () => new LocalConstructorContributor()); |
95 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 96 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
| 97 () => new LocalLibraryContributor()); |
| 98 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
96 () => new LocalReferenceContributor()); | 99 () => new LocalReferenceContributor()); |
97 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 100 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
98 () => new NamedConstructorContributor()); | 101 () => new NamedConstructorContributor()); |
99 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 102 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
100 () => new StaticMemberContributor()); | 103 () => new StaticMemberContributor()); |
101 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 104 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
102 () => new TypeMemberContributor()); | 105 () => new TypeMemberContributor()); |
103 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 106 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
104 () => new UriContributor()); | 107 () => new UriContributor()); |
105 } | 108 } |
106 | 109 |
107 /** | 110 /** |
108 * Validate the given extension by throwing an [ExtensionError] if it is not a | 111 * Validate the given extension by throwing an [ExtensionError] if it is not a |
109 * valid Dart specific completion contributor. | 112 * valid Dart specific completion contributor. |
110 */ | 113 */ |
111 void _validateDartCompletionContributorExtension(Object extension) { | 114 void _validateDartCompletionContributorExtension(Object extension) { |
112 if (extension is! DartCompletionContributorFactory) { | 115 if (extension is! DartCompletionContributorFactory) { |
113 String id = _contributorExtensionPoint.uniqueIdentifier; | 116 String id = _contributorExtensionPoint.uniqueIdentifier; |
114 throw new ExtensionError( | 117 throw new ExtensionError( |
115 'Extensions to $id must be a DartCompletionContributorFactory'); | 118 'Extensions to $id must be a DartCompletionContributorFactory'); |
116 } | 119 } |
117 } | 120 } |
118 } | 121 } |
OLD | NEW |