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

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

Issue 1001143002: remove duplicate completion suggestions (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/imported_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.dart; 5 library services.completion.dart;
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/arglist_computer.dart'; 10 import 'package:analysis_server/src/services/completion/arglist_computer.dart';
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 final DartCompletionCache cache; 71 final DartCompletionCache cache;
72 List<DartCompletionComputer> computers; 72 List<DartCompletionComputer> computers;
73 CommonUsageComputer commonUsageComputer; 73 CommonUsageComputer commonUsageComputer;
74 74
75 DartCompletionManager( 75 DartCompletionManager(
76 AnalysisContext context, this.searchEngine, Source source, this.cache, 76 AnalysisContext context, this.searchEngine, Source source, this.cache,
77 [this.computers, this.commonUsageComputer]) 77 [this.computers, this.commonUsageComputer])
78 : super(context, source) { 78 : super(context, source) {
79 if (computers == null) { 79 if (computers == null) {
80 computers = [ 80 computers = [
81 // LocalComputer before ImportedComputer
82 // because local suggestions take precedence
83 new LocalComputer(),
84 new ImportedComputer(),
81 new KeywordComputer(), 85 new KeywordComputer(),
82 new LocalComputer(),
83 new ArgListComputer(), 86 new ArgListComputer(),
84 new CombinatorComputer(), 87 new CombinatorComputer(),
85 new ImportedComputer(),
86 new InvocationComputer() 88 new InvocationComputer()
87 ]; 89 ];
88 } 90 }
89 if (commonUsageComputer == null) { 91 if (commonUsageComputer == null) {
90 commonUsageComputer = new CommonUsageComputer(); 92 commonUsageComputer = new CommonUsageComputer();
91 } 93 }
92 } 94 }
93 95
94 /** 96 /**
95 * Create a new initialized Dart source completion manager 97 * Create a new initialized Dart source completion manager
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 parameterNames: suggestion.parameterNames, 363 parameterNames: suggestion.parameterNames,
362 parameterTypes: suggestion.parameterTypes, 364 parameterTypes: suggestion.parameterTypes,
363 requiredParameterCount: suggestion.requiredParameterCount, 365 requiredParameterCount: suggestion.requiredParameterCount,
364 hasNamedParameters: suggestion.hasNamedParameters, 366 hasNamedParameters: suggestion.hasNamedParameters,
365 returnType: suggestion.returnType, 367 returnType: suggestion.returnType,
366 element: suggestion.element); 368 element: suggestion.element);
367 } 369 }
368 } 370 }
369 } 371 }
370 } 372 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/imported_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698