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

Side by Side Diff: pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart

Issue 1527793003: Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer) (Closed) Base URL: https://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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.arglist; 5 library services.completion.contributor.dart.arglist;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol_server.dart' 9 import 'package:analysis_server/src/protocol_server.dart'
10 hide Element, ElementKind; 10 hide Element, ElementKind;
11 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 11 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
12 import 'package:analyzer/dart/element/element.dart';
12 import 'package:analyzer/src/generated/ast.dart'; 13 import 'package:analyzer/src/generated/ast.dart';
13 import 'package:analyzer/src/generated/element.dart';
14 import 'package:analyzer/src/generated/utilities_dart.dart'; 14 import 'package:analyzer/src/generated/utilities_dart.dart';
15 15
16 /** 16 /**
17 * Determine the number of arguments. 17 * Determine the number of arguments.
18 */ 18 */
19 int _argCount(DartCompletionRequest request) { 19 int _argCount(DartCompletionRequest request) {
20 AstNode node = request.target.containingNode; 20 AstNode node = request.target.containingNode;
21 if (node is ArgumentList) { 21 if (node is ArgumentList) {
22 return node.arguments.length; 22 return node.arguments.length;
23 } 23 }
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 _addArgListSuggestion(requiredParam); 253 _addArgListSuggestion(requiredParam);
254 return; 254 return;
255 } 255 }
256 if (_isEditingNamedArgLabel(request) || _isAppendingToArgList(request)) { 256 if (_isEditingNamedArgLabel(request) || _isAppendingToArgList(request)) {
257 if (requiredCount == 0 || requiredCount < _argCount(request)) { 257 if (requiredCount == 0 || requiredCount < _argCount(request)) {
258 _addDefaultParamSuggestions(parameters); 258 _addDefaultParamSuggestions(parameters);
259 } 259 }
260 } 260 }
261 } 261 }
262 } 262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698