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

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

Issue 1100393004: add dart: and package: import uri suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 8 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/import_uri_contributor.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_contributor.dart '; 10 import 'package:analysis_server/src/services/completion/arglist_contributor.dart ';
11 import 'package:analysis_server/src/services/completion/combinator_contributor.d art'; 11 import 'package:analysis_server/src/services/completion/combinator_contributor.d art';
12 import 'package:analysis_server/src/services/completion/common_usage_computer.da rt'; 12 import 'package:analysis_server/src/services/completion/common_usage_computer.da rt';
13 import 'package:analysis_server/src/services/completion/completion_manager.dart' ; 13 import 'package:analysis_server/src/services/completion/completion_manager.dart' ;
14 import 'package:analysis_server/src/services/completion/completion_target.dart'; 14 import 'package:analysis_server/src/services/completion/completion_target.dart';
15 import 'package:analysis_server/src/services/completion/dart_completion_cache.da rt'; 15 import 'package:analysis_server/src/services/completion/dart_completion_cache.da rt';
16 import 'package:analysis_server/src/services/completion/import_uri_contributor.d art';
16 import 'package:analysis_server/src/services/completion/imported_reference_contr ibutor.dart'; 17 import 'package:analysis_server/src/services/completion/imported_reference_contr ibutor.dart';
17 import 'package:analysis_server/src/services/completion/prefixed_element_contrib utor.dart';
18 import 'package:analysis_server/src/services/completion/keyword_contributor.dart '; 18 import 'package:analysis_server/src/services/completion/keyword_contributor.dart ';
19 import 'package:analysis_server/src/services/completion/local_reference_contribu tor.dart'; 19 import 'package:analysis_server/src/services/completion/local_reference_contribu tor.dart';
20 import 'package:analysis_server/src/services/completion/optype.dart'; 20 import 'package:analysis_server/src/services/completion/optype.dart';
21 import 'package:analysis_server/src/services/completion/prefixed_element_contrib utor.dart';
21 import 'package:analysis_server/src/services/search/search_engine.dart'; 22 import 'package:analysis_server/src/services/search/search_engine.dart';
22 import 'package:analyzer/src/generated/ast.dart'; 23 import 'package:analyzer/src/generated/ast.dart';
23 import 'package:analyzer/src/generated/engine.dart'; 24 import 'package:analyzer/src/generated/engine.dart';
24 import 'package:analyzer/src/generated/scanner.dart'; 25 import 'package:analyzer/src/generated/scanner.dart';
25 import 'package:analyzer/src/generated/source.dart'; 26 import 'package:analyzer/src/generated/source.dart';
26 27
27 const int DART_RELEVANCE_COMMON_USAGE = 1200; 28 const int DART_RELEVANCE_COMMON_USAGE = 1200;
28 const int DART_RELEVANCE_DEFAULT = 1000; 29 const int DART_RELEVANCE_DEFAULT = 1000;
29 const int DART_RELEVANCE_HIGH = 2000; 30 const int DART_RELEVANCE_HIGH = 2000;
30 const int DART_RELEVANCE_INHERITED_ACCESSOR = 1057; 31 const int DART_RELEVANCE_INHERITED_ACCESSOR = 1057;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 if (contributors == null) { 80 if (contributors == null) {
80 contributors = [ 81 contributors = [
81 // LocalReferenceContributor before ImportedReferenceContributor 82 // LocalReferenceContributor before ImportedReferenceContributor
82 // because local suggestions take precedence 83 // because local suggestions take precedence
83 // and can hide other suggestions with the same name 84 // and can hide other suggestions with the same name
84 new LocalReferenceContributor(), 85 new LocalReferenceContributor(),
85 new ImportedReferenceContributor(), 86 new ImportedReferenceContributor(),
86 new KeywordContributor(), 87 new KeywordContributor(),
87 new ArgListContributor(), 88 new ArgListContributor(),
88 new CombinatorContributor(), 89 new CombinatorContributor(),
89 new PrefixedElementContributor() 90 new PrefixedElementContributor(),
91 new ImportUriContributor(),
90 ]; 92 ];
91 } 93 }
92 if (commonUsageComputer == null) { 94 if (commonUsageComputer == null) {
93 commonUsageComputer = new CommonUsageComputer(); 95 commonUsageComputer = new CommonUsageComputer();
94 } 96 }
95 } 97 }
96 98
97 /** 99 /**
98 * Create a new initialized Dart source completion manager 100 * Create a new initialized Dart source completion manager
99 */ 101 */
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 parameterNames: suggestion.parameterNames, 375 parameterNames: suggestion.parameterNames,
374 parameterTypes: suggestion.parameterTypes, 376 parameterTypes: suggestion.parameterTypes,
375 requiredParameterCount: suggestion.requiredParameterCount, 377 requiredParameterCount: suggestion.requiredParameterCount,
376 hasNamedParameters: suggestion.hasNamedParameters, 378 hasNamedParameters: suggestion.hasNamedParameters,
377 returnType: suggestion.returnType, 379 returnType: suggestion.returnType,
378 element: suggestion.element); 380 element: suggestion.element);
379 } 381 }
380 } 382 }
381 } 383 }
382 } 384 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/completion/import_uri_contributor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698