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

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

Issue 1505703003: extract StaticMemberContributor from PrefixedElementContributor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/dart/static_member_contributor.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/keyword_contributor .dart'; 14 import 'package:analysis_server/src/services/completion/dart/keyword_contributor .dart';
15 import 'package:analysis_server/src/services/completion/dart/named_constructor_c ontributor.dart'; 15 import 'package:analysis_server/src/services/completion/dart/named_constructor_c ontributor.dart';
16 import 'package:analysis_server/src/services/completion/dart/static_member_contr ibutor.dart';
16 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar t'; 17 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar t';
17 import 'package:plugin/plugin.dart'; 18 import 'package:plugin/plugin.dart';
18 19
19 /** 20 /**
20 * The shared dart completion plugin instance. 21 * The shared dart completion plugin instance.
21 */ 22 */
22 final DartCompletionPlugin dartCompletionPlugin = new DartCompletionPlugin(); 23 final DartCompletionPlugin dartCompletionPlugin = new DartCompletionPlugin();
23 24
24 class DartCompletionPlugin implements Plugin { 25 class DartCompletionPlugin implements Plugin {
25 /** 26 /**
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 () => new ArgListContributor()); 74 () => new ArgListContributor());
74 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 75 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
75 () => new CombinatorContributor()); 76 () => new CombinatorContributor());
76 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 77 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
77 () => new FieldFormalContributor()); 78 () => new FieldFormalContributor());
78 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 79 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
79 () => new KeywordContributor()); 80 () => new KeywordContributor());
80 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 81 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
81 () => new NamedConstructorContributor()); 82 () => new NamedConstructorContributor());
82 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 83 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
84 () => new StaticMemberContributor());
85 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
83 () => new UriContributor()); 86 () => new UriContributor());
84 } 87 }
85 88
86 /** 89 /**
87 * Validate the given extension by throwing an [ExtensionError] if it is not a 90 * Validate the given extension by throwing an [ExtensionError] if it is not a
88 * valid Dart specific completion contributor. 91 * valid Dart specific completion contributor.
89 */ 92 */
90 void _validateDartCompletionContributorExtension(Object extension) { 93 void _validateDartCompletionContributorExtension(Object extension) {
91 if (extension is! DartCompletionContributorFactory) { 94 if (extension is! DartCompletionContributorFactory) {
92 String id = _contributorExtensionPoint.uniqueIdentifier; 95 String id = _contributorExtensionPoint.uniqueIdentifier;
93 throw new ExtensionError( 96 throw new ExtensionError(
94 'Extensions to $id must be a DartCompletionContributorFactory'); 97 'Extensions to $id must be a DartCompletionContributorFactory');
95 } 98 }
96 } 99 }
97 } 100 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/dart/static_member_contributor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698