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

Side by Side Diff: pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.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 services.completion.contributor.dart.constructor; 5 library services.completion.contributor.dart.constructor;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol 9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
10 show Element, ElementKind; 10 show Element, ElementKind;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 174 }
175 175
176 /** 176 /**
177 * A visitor for collecting constructor suggestions. 177 * A visitor for collecting constructor suggestions.
178 */ 178 */
179 class _Visitor extends LocalDeclarationVisitor { 179 class _Visitor extends LocalDeclarationVisitor {
180 final DartCompletionRequest request; 180 final DartCompletionRequest request;
181 final List<CompletionSuggestion> suggestions; 181 final List<CompletionSuggestion> suggestions;
182 182
183 _Visitor(DartCompletionRequest request, this.suggestions) 183 _Visitor(DartCompletionRequest request, this.suggestions)
184 : super(request.offset), 184 : request = request,
185 request = request; 185 super(request.offset);
186 186
187 @override 187 @override
188 void declaredClass(ClassDeclaration declaration) { 188 void declaredClass(ClassDeclaration declaration) {
189 bool found = false; 189 bool found = false;
190 for (ClassMember member in declaration.members) { 190 for (ClassMember member in declaration.members) {
191 if (member is ConstructorDeclaration) { 191 if (member is ConstructorDeclaration) {
192 found = true; 192 found = true;
193 _addSuggestion(declaration, member); 193 _addSuggestion(declaration, member);
194 } 194 }
195 } 195 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 declaringType: classDecl.name.name, 273 declaringType: classDecl.name.name,
274 element: element, 274 element: element,
275 parameterNames: [], 275 parameterNames: [],
276 parameterTypes: [], 276 parameterTypes: [],
277 requiredParameterCount: 0, 277 requiredParameterCount: 0,
278 hasNamedParameters: false); 278 hasNamedParameters: false);
279 suggestions.add(suggestion); 279 suggestions.add(suggestion);
280 } 280 }
281 } 281 }
282 } 282 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698