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

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

Issue 1498733005: convert uri contributor to use new task model (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/uri_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/completion_manager. dart'; 11 import 'package:analysis_server/src/services/completion/dart/completion_manager. dart';
12 import 'package:analysis_server/src/services/completion/dart/keyword_contributor .dart'; 12 import 'package:analysis_server/src/services/completion/dart/keyword_contributor .dart';
13 import 'package:analysis_server/src/services/completion/dart/uri_contributor.dar t';
13 import 'package:plugin/plugin.dart'; 14 import 'package:plugin/plugin.dart';
14 15
15 /** 16 /**
16 * The shared dart completion plugin instance. 17 * The shared dart completion plugin instance.
17 */ 18 */
18 final DartCompletionPlugin dartCompletionPlugin = new DartCompletionPlugin(); 19 final DartCompletionPlugin dartCompletionPlugin = new DartCompletionPlugin();
19 20
20 class DartCompletionPlugin implements Plugin { 21 class DartCompletionPlugin implements Plugin {
21 /** 22 /**
22 * The simple identifier of the extension point that allows plugins to 23 * The simple identifier of the extension point that allows plugins to
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // 63 //
63 registerExtension(COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 64 registerExtension(COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
64 () => new DartCompletionManager()); 65 () => new DartCompletionManager());
65 // 66 //
66 // Register the default DartCompletionContributors 67 // Register the default DartCompletionContributors
67 // 68 //
68 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 69 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
69 () => new ArgListContributor()); 70 () => new ArgListContributor());
70 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID, 71 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
71 () => new KeywordContributor()); 72 () => new KeywordContributor());
73 registerExtension(DART_COMPLETION_CONTRIBUTOR_EXTENSION_POINT_ID,
74 () => new UriContributor());
72 } 75 }
73 76
74 /** 77 /**
75 * Validate the given extension by throwing an [ExtensionError] if it is not a 78 * Validate the given extension by throwing an [ExtensionError] if it is not a
76 * valid Dart specific completion contributor. 79 * valid Dart specific completion contributor.
77 */ 80 */
78 void _validateDartCompletionContributorExtension(Object extension) { 81 void _validateDartCompletionContributorExtension(Object extension) {
79 if (extension is! DartCompletionContributorFactory) { 82 if (extension is! DartCompletionContributorFactory) {
80 String id = _contributorExtensionPoint.uniqueIdentifier; 83 String id = _contributorExtensionPoint.uniqueIdentifier;
81 throw new ExtensionError( 84 throw new ExtensionError(
82 'Extensions to $id must be a DartCompletionContributorFactory'); 85 'Extensions to $id must be a DartCompletionContributorFactory');
83 } 86 }
84 } 87 }
85 } 88 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698