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

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

Issue 1004343002: Completion should not show overridden inherited methods (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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/dart_completion_manager.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.arglist; 5 library services.completion.computer.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;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 paramTypes.add(_getParamType(param)); 172 paramTypes.add(_getParamType(param));
173 } 173 }
174 } 174 }
175 } 175 }
176 completion.write(')'); 176 completion.write(')');
177 CompletionSuggestion suggestion = new CompletionSuggestion( 177 CompletionSuggestion suggestion = new CompletionSuggestion(
178 CompletionSuggestionKind.ARGUMENT_LIST, DART_RELEVANCE_HIGH, 178 CompletionSuggestionKind.ARGUMENT_LIST, DART_RELEVANCE_HIGH,
179 completion.toString(), completion.length, 0, false, false); 179 completion.toString(), completion.length, 0, false, false);
180 suggestion.parameterNames = paramNames; 180 suggestion.parameterNames = paramNames;
181 suggestion.parameterTypes = paramTypes; 181 suggestion.parameterTypes = paramTypes;
182 request.suggestions.add(suggestion); 182 request.addSuggestion(suggestion);
183 } 183 }
184 184
185 String _getParamType(FormalParameter param) { 185 String _getParamType(FormalParameter param) {
186 TypeName type; 186 TypeName type;
187 if (param is SimpleFormalParameter) { 187 if (param is SimpleFormalParameter) {
188 type = param.type; 188 type = param.type;
189 } 189 }
190 if (type != null) { 190 if (type != null) {
191 Identifier id = type.name; 191 Identifier id = type.name;
192 if (id != null) { 192 if (id != null) {
193 String name = id.name; 193 String name = id.name;
194 if (name != null && name.length > 0) { 194 if (name != null && name.length > 0) {
195 return name; 195 return name;
196 } 196 }
197 } 197 }
198 } 198 }
199 return 'dynamic'; 199 return 'dynamic';
200 } 200 }
201 } 201 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/dart_completion_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698