| OLD | NEW |
| 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/plugin/protocol/protocol.dart'; | 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 10 import 'package:analysis_server/src/provisional/completion/completion_core.dart' | 10 import 'package:analysis_server/src/provisional/completion/completion_core.dart' |
| 11 show AnalysisRequest, CompletionContributor, CompletionRequest; | 11 show AnalysisRequest, CompletionContributor, CompletionRequest; |
| 12 import 'package:analysis_server/src/provisional/completion/dart/completion_targe
t.dart'; | 12 import 'package:analysis_server/src/provisional/completion/dart/completion_targe
t.dart'; |
| 13 import 'package:analysis_server/src/services/completion/combinator_contributor.d
art'; | |
| 14 import 'package:analysis_server/src/services/completion/completion_core.dart'; | 13 import 'package:analysis_server/src/services/completion/completion_core.dart'; |
| 15 import 'package:analysis_server/src/services/completion/completion_manager.dart'
; | 14 import 'package:analysis_server/src/services/completion/completion_manager.dart'
; |
| 16 import 'package:analysis_server/src/services/completion/dart/common_usage_sorter
.dart'; | 15 import 'package:analysis_server/src/services/completion/dart/common_usage_sorter
.dart'; |
| 17 import 'package:analysis_server/src/services/completion/dart/contribution_sorter
.dart'; | 16 import 'package:analysis_server/src/services/completion/dart/contribution_sorter
.dart'; |
| 18 import 'package:analysis_server/src/services/completion/dart_completion_cache.da
rt'; | 17 import 'package:analysis_server/src/services/completion/dart_completion_cache.da
rt'; |
| 19 import 'package:analysis_server/src/services/completion/imported_reference_contr
ibutor.dart'; | 18 import 'package:analysis_server/src/services/completion/imported_reference_contr
ibutor.dart'; |
| 20 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'; |
| 21 import 'package:analysis_server/src/services/completion/optype.dart'; | 20 import 'package:analysis_server/src/services/completion/optype.dart'; |
| 22 import 'package:analysis_server/src/services/completion/prefixed_element_contrib
utor.dart'; | 21 import 'package:analysis_server/src/services/completion/prefixed_element_contrib
utor.dart'; |
| 23 import 'package:analysis_server/src/services/search/search_engine.dart'; | 22 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 : super(context, source) { | 91 : super(context, source) { |
| 93 if (contributors == null) { | 92 if (contributors == null) { |
| 94 contributors = [ | 93 contributors = [ |
| 95 // LocalReferenceContributor before ImportedReferenceContributor | 94 // LocalReferenceContributor before ImportedReferenceContributor |
| 96 // because local suggestions take precedence | 95 // because local suggestions take precedence |
| 97 // and can hide other suggestions with the same name | 96 // and can hide other suggestions with the same name |
| 98 new LocalReferenceContributor(), | 97 new LocalReferenceContributor(), |
| 99 new ImportedReferenceContributor(), | 98 new ImportedReferenceContributor(), |
| 100 //new KeywordContributor(), | 99 //new KeywordContributor(), |
| 101 //new ArgListContributor(), | 100 //new ArgListContributor(), |
| 102 new CombinatorContributor(), | 101 // new CombinatorContributor(), |
| 103 new PrefixedElementContributor(), | 102 new PrefixedElementContributor(), |
| 104 //new UriContributor(), | 103 //new UriContributor(), |
| 105 // TODO(brianwilkerson) Use the completion contributor extension point | 104 // TODO(brianwilkerson) Use the completion contributor extension point |
| 106 // to add the contributor below (and eventually, all the contributors). | 105 // to add the contributor below (and eventually, all the contributors). |
| 107 // new NewCompletionWrapper(new InheritedContributor()) | 106 // new NewCompletionWrapper(new InheritedContributor()) |
| 108 ]; | 107 ]; |
| 109 } | 108 } |
| 110 if (newContributors == null) { | 109 if (newContributors == null) { |
| 111 newContributors = <CompletionContributor>[]; | 110 newContributors = <CompletionContributor>[]; |
| 112 } | 111 } |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 // Replacement range for import URI | 481 // Replacement range for import URI |
| 483 return new ReplacementRange(start, end - start); | 482 return new ReplacementRange(start, end - start); |
| 484 } | 483 } |
| 485 } | 484 } |
| 486 } | 485 } |
| 487 } | 486 } |
| 488 } | 487 } |
| 489 return new ReplacementRange(requestOffset, 0); | 488 return new ReplacementRange(requestOffset, 0); |
| 490 } | 489 } |
| 491 } | 490 } |
| OLD | NEW |