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

Side by Side Diff: pkg/analysis_server/lib/src/services/completion/keyword_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
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.keyword; 5 library services.completion.computer.dart.keyword;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart'; 9 import 'package:analysis_server/src/protocol.dart';
10 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 10 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 _addSuggestion(Keyword.WITH, DART_RELEVANCE_HIGH); 212 _addSuggestion(Keyword.WITH, DART_RELEVANCE_HIGH);
213 } 213 }
214 if (node.implementsClause == null) { 214 if (node.implementsClause == null) {
215 _addSuggestion(Keyword.IMPLEMENTS, DART_RELEVANCE_HIGH); 215 _addSuggestion(Keyword.IMPLEMENTS, DART_RELEVANCE_HIGH);
216 } 216 }
217 } 217 }
218 218
219 void _addSuggestion(Keyword keyword, 219 void _addSuggestion(Keyword keyword,
220 [int relevance = DART_RELEVANCE_DEFAULT]) { 220 [int relevance = DART_RELEVANCE_DEFAULT]) {
221 String completion = keyword.syntax; 221 String completion = keyword.syntax;
222 request.suggestions.add(new CompletionSuggestion( 222 request.addSuggestion(new CompletionSuggestion(
223 CompletionSuggestionKind.KEYWORD, 223 CompletionSuggestionKind.KEYWORD,
224 relevance, completion, completion.length, 0, false, false)); 224 relevance, completion, completion.length, 0, false, false));
225 } 225 }
226 226
227 void _addSuggestions(List<Keyword> keywords, 227 void _addSuggestions(List<Keyword> keywords,
228 [int relevance = DART_RELEVANCE_KEYWORD]) { 228 [int relevance = DART_RELEVANCE_KEYWORD]) {
229 keywords.forEach((Keyword keyword) { 229 keywords.forEach((Keyword keyword) {
230 _addSuggestion(keyword, relevance); 230 _addSuggestion(keyword, relevance);
231 }); 231 });
232 } 232 }
(...skipping 17 matching lines...) Expand all
250 return false; 250 return false;
251 } 251 }
252 AstNode parent = body.parent; 252 AstNode parent = body.parent;
253 if (parent is ConstructorDeclaration || parent is MethodDeclaration) { 253 if (parent is ConstructorDeclaration || parent is MethodDeclaration) {
254 return true; 254 return true;
255 } 255 }
256 node = parent; 256 node = parent;
257 } 257 }
258 } 258 }
259 } 259 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698