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'; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 92 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
93 () => new LibraryPrefixContributor()); | 93 () => new LibraryPrefixContributor()); |
94 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 94 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
95 () => new LocalConstructorContributor()); | 95 () => new LocalConstructorContributor()); |
96 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 96 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
97 () => new LocalLibraryContributor()); | 97 () => new LocalLibraryContributor()); |
98 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 98 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
99 () => new LocalReferenceContributor()); | 99 () => new LocalReferenceContributor()); |
100 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 100 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
101 () => new NamedConstructorContributor()); | 101 () => new NamedConstructorContributor()); |
| 102 // Revisit this contributor and these tests |
| 103 // once DartChangeBuilder API has solidified. |
| 104 // registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
| 105 // () => new OverrideContributor()); |
102 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 106 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
103 () => new StaticMemberContributor()); | 107 () => new StaticMemberContributor()); |
104 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 108 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
105 () => new TypeMemberContributor()); | 109 () => new TypeMemberContributor()); |
106 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, | 110 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, |
107 () => new UriContributor()); | 111 () => new UriContributor()); |
108 } | 112 } |
109 | 113 |
110 /** | 114 /** |
111 * Validate the given extension by throwing an [ExtensionError] if it is not a | 115 * Validate the given extension by throwing an [ExtensionError] if it is not a |
112 * valid Dart specific completion contributor. | 116 * valid Dart specific completion contributor. |
113 */ | 117 */ |
114 void _validateDartCompletionContributorExtension(Object extension) { | 118 void _validateDartCompletionContributorExtension(Object extension) { |
115 if (extension is! DartCompletionContributorFactory) { | 119 if (extension is! DartCompletionContributorFactory) { |
116 String id = _contributorExtensionPoint.uniqueIdentifier; | 120 String id = _contributorExtensionPoint.uniqueIdentifier; |
117 throw new ExtensionError( | 121 throw new ExtensionError( |
118 'Extensions to $id must be a DartCompletionContributorFactory'); | 122 'Extensions to $id must be a DartCompletionContributorFactory'); |
119 } | 123 } |
120 } | 124 } |
121 } | 125 } |
OLD | NEW |