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

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

Issue 1842063003: Start making server strong mode clean (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove unintended change Created 4 years, 8 months 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';
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 /** 48 /**
49 * The extension point that allows plugins to register Dart specific 49 * The extension point that allows plugins to register Dart specific
50 * completion contributor factories. 50 * completion contributor factories.
51 */ 51 */
52 ExtensionPoint _contributorExtensionPoint; 52 ExtensionPoint _contributorExtensionPoint;
53 53
54 /** 54 /**
55 * Return a list containing all of the Dart specific completion contributors. 55 * Return a list containing all of the Dart specific completion contributors.
56 */ 56 */
57 Iterable<DartCompletionContributor> get contributors => 57 Iterable<DartCompletionContributor> get contributors =>
58 _contributorExtensionPoint.extensions 58 _contributorExtensionPoint.extensions.map(
59 .map((DartCompletionContributorFactory factory) => factory()); 59 (Object factory) => (factory as DartCompletionContributorFactory)());
60 60
61 @override 61 @override
62 String get uniqueIdentifier => UNIQUE_IDENTIFIER; 62 String get uniqueIdentifier => UNIQUE_IDENTIFIER;
63 63
64 @override 64 @override
65 void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) { 65 void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) {
66 _contributorExtensionPoint = registerExtensionPoint( 66 _contributorExtensionPoint = registerExtensionPoint(
67 CONTRIBUTOR_EXTENSION_POINT, 67 CONTRIBUTOR_EXTENSION_POINT,
68 _validateDartCompletionContributorExtension); 68 _validateDartCompletionContributorExtension);
69 } 69 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 * valid Dart specific completion contributor. 122 * valid Dart specific completion contributor.
123 */ 123 */
124 void _validateDartCompletionContributorExtension(Object extension) { 124 void _validateDartCompletionContributorExtension(Object extension) {
125 if (extension is! DartCompletionContributorFactory) { 125 if (extension is! DartCompletionContributorFactory) {
126 String id = _contributorExtensionPoint.uniqueIdentifier; 126 String id = _contributorExtensionPoint.uniqueIdentifier;
127 throw new ExtensionError( 127 throw new ExtensionError(
128 'Extensions to $id must be a DartCompletionContributorFactory'); 128 'Extensions to $id must be a DartCompletionContributorFactory');
129 } 129 }
130 } 130 }
131 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698