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

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

Issue 908493003: filter static methods when showing instance completions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 10 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/suggestion_builder.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.invocation; 5 library services.completion.computer.dart.invocation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 9 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
10 import 'package:analysis_server/src/services/completion/optype.dart'; 10 import 'package:analysis_server/src/services/completion/optype.dart';
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 @override 56 @override
57 Future<bool> computeFull(AstNode node) { 57 Future<bool> computeFull(AstNode node) {
58 if (node is SimpleIdentifier) { 58 if (node is SimpleIdentifier) {
59 node = node.parent; 59 node = node.parent;
60 } 60 }
61 if (node is MethodInvocation) { 61 if (node is MethodInvocation) {
62 node = (node as MethodInvocation).realTarget; 62 node = (node as MethodInvocation).realTarget;
63 } else if (node is PropertyAccess) { 63 } else if (node is PropertyAccess) {
64 node = (node as PropertyAccess).realTarget; 64 node = (node as PropertyAccess).realTarget;
65 } 65 }
66 if (node is Identifier && node.bestElement is ClassElement) {
67 node.bestElement.accept(
68 new _PrefixedIdentifierSuggestionBuilder(request));
69 return new Future.value(true);
70 }
66 if (node is Expression) { 71 if (node is Expression) {
67 InterfaceTypeSuggestionBuilder.suggestionsFor(request, node.bestType); 72 InterfaceTypeSuggestionBuilder.suggestionsFor(request, node.bestType);
68 return new Future.value(true); 73 return new Future.value(true);
69 } 74 }
70 return new Future.value(false); 75 return new Future.value(false);
71 } 76 }
72 } 77 }
73 78
74 /** 79 /**
75 * An [AstNode] vistor for determining which suggestion builder 80 * An [AstNode] vistor for determining which suggestion builder
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 217 }
213 return new Future.value(false); 218 return new Future.value(false);
214 } 219 }
215 220
216 @override 221 @override
217 Future<bool> visitVariableElement(VariableElement element) { 222 Future<bool> visitVariableElement(VariableElement element) {
218 InterfaceTypeSuggestionBuilder.suggestionsFor(request, element.type); 223 InterfaceTypeSuggestionBuilder.suggestionsFor(request, element.type);
219 return new Future.value(true); 224 return new Future.value(true);
220 } 225 }
221 } 226 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698