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

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

Issue 1035283002: only suggest types when completing from a library prefix in parameter list (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/invocation_computer.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) 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.computer.dart.combinator; 5 library services.completion.computer.dart.combinator;
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;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 /** 65 /**
66 * A `_CombinatorSuggestionBuilder` determines which imported classes 66 * A `_CombinatorSuggestionBuilder` determines which imported classes
67 * and top level variables should be suggested and builds those suggestions. 67 * and top level variables should be suggested and builds those suggestions.
68 * This operation is instantiated during `computeFast` 68 * This operation is instantiated during `computeFast`
69 * and calculates the suggestions during `computeFull`. 69 * and calculates the suggestions during `computeFull`.
70 */ 70 */
71 class _CombinatorSuggestionBuilder extends LibraryElementSuggestionBuilder { 71 class _CombinatorSuggestionBuilder extends LibraryElementSuggestionBuilder {
72 _CombinatorSuggestionBuilder( 72 _CombinatorSuggestionBuilder(
73 DartCompletionRequest request, CompletionSuggestionKind kind) 73 DartCompletionRequest request, CompletionSuggestionKind kind)
74 : super(request, kind); 74 : super(request, kind, false);
75 75
76 Future<bool> execute(AstNode node) { 76 Future<bool> execute(AstNode node) {
77 var directive = node.getAncestor((parent) => parent is NamespaceDirective); 77 var directive = node.getAncestor((parent) => parent is NamespaceDirective);
78 if (directive is NamespaceDirective) { 78 if (directive is NamespaceDirective) {
79 LibraryElement library = directive.uriElement; 79 LibraryElement library = directive.uriElement;
80 if (library != null) { 80 if (library != null) {
81 library.visitChildren(this); 81 library.visitChildren(this);
82 } 82 }
83 } 83 }
84 return new Future.value(false); 84 return new Future.value(false);
85 } 85 }
86 } 86 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/invocation_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698