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

Side by Side Diff: pkg/analysis_server/lib/src/provisional/completion/dart/completion_plugin.dart

Issue 1526303003: convert ImportedReferenceContributor to new API (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years 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
OLDNEW
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/imported_reference_ contributor.dart';
14 import 'package:analysis_server/src/services/completion/dart/inherited_reference _contributor.dart'; 15 import 'package:analysis_server/src/services/completion/dart/inherited_reference _contributor.dart';
15 import 'package:analysis_server/src/services/completion/dart/keyword_contributor .dart'; 16 import 'package:analysis_server/src/services/completion/dart/keyword_contributor .dart';
16 import 'package:analysis_server/src/services/completion/dart/label_contributor.d art'; 17 import 'package:analysis_server/src/services/completion/dart/label_contributor.d art';
17 import 'package:analysis_server/src/services/completion/dart/library_member_cont ributor.dart'; 18 import 'package:analysis_server/src/services/completion/dart/library_member_cont ributor.dart';
18 import 'package:analysis_server/src/services/completion/dart/library_prefix_cont ributor.dart'; 19 import 'package:analysis_server/src/services/completion/dart/library_prefix_cont ributor.dart';
19 import 'package:analysis_server/src/services/completion/dart/local_constructor_c ontributor.dart'; 20 import 'package:analysis_server/src/services/completion/dart/local_constructor_c ontributor.dart';
20 import 'package:analysis_server/src/services/completion/dart/local_library_contr ibutor.dart'; 21 import 'package:analysis_server/src/services/completion/dart/local_library_contr ibutor.dart';
21 import 'package:analysis_server/src/services/completion/dart/local_reference_con tributor.dart'; 22 import 'package:analysis_server/src/services/completion/dart/local_reference_con tributor.dart';
22 import 'package:analysis_server/src/services/completion/dart/named_constructor_c ontributor.dart'; 23 import 'package:analysis_server/src/services/completion/dart/named_constructor_c ontributor.dart';
23 import 'package:analysis_server/src/services/completion/dart/static_member_contr ibutor.dart'; 24 import 'package:analysis_server/src/services/completion/dart/static_member_contr ibutor.dart';
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // 79 //
79 // Register the default DartCompletionContributors 80 // Register the default DartCompletionContributors
80 // 81 //
81 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 82 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
82 () => new ArgListContributor()); 83 () => new ArgListContributor());
83 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 84 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
84 () => new CombinatorContributor()); 85 () => new CombinatorContributor());
85 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 86 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
86 () => new FieldFormalContributor()); 87 () => new FieldFormalContributor());
87 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 88 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
89 () => new ImportedReferenceContributor());
90 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
88 () => new InheritedReferenceContributor()); 91 () => new InheritedReferenceContributor());
89 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 92 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
90 () => new KeywordContributor()); 93 () => new KeywordContributor());
91 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 94 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
92 () => new LabelContributor()); 95 () => new LabelContributor());
93 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 96 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
94 () => new LibraryMemberContributor()); 97 () => new LibraryMemberContributor());
95 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 98 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
96 () => new LibraryPrefixContributor()); 99 () => new LibraryPrefixContributor());
97 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 100 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
(...skipping 21 matching lines...) Expand all
119 * valid Dart specific completion contributor. 122 * valid Dart specific completion contributor.
120 */ 123 */
121 void _validateDartCompletionContributorExtension(Object extension) { 124 void _validateDartCompletionContributorExtension(Object extension) {
122 if (extension is! DartCompletionContributorFactory) { 125 if (extension is! DartCompletionContributorFactory) {
123 String id = _contributorExtensionPoint.uniqueIdentifier; 126 String id = _contributorExtensionPoint.uniqueIdentifier;
124 throw new ExtensionError( 127 throw new ExtensionError(
125 'Extensions to $id must be a DartCompletionContributorFactory'); 128 'Extensions to $id must be a DartCompletionContributorFactory');
126 } 129 }
127 } 130 }
128 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698