| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.manager; | 5 library services.completion.dart.manager; |
| 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 CompletionContributor, CompletionRequest; | 11 show CompletionContributor, CompletionRequest; |
| 12 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | 12 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; |
| 13 import 'package:analysis_server/src/provisional/completion/dart/completion_plugi
n.dart'; | 13 import 'package:analysis_server/src/provisional/completion/dart/completion_plugi
n.dart'; |
| 14 import 'package:analysis_server/src/provisional/completion/dart/completion_targe
t.dart'; | 14 import 'package:analysis_server/src/provisional/completion/dart/completion_targe
t.dart'; |
| 15 import 'package:analysis_server/src/services/completion/completion_core.dart'; | 15 import 'package:analysis_server/src/services/completion/completion_core.dart'; |
| 16 import 'package:analysis_server/src/services/completion/completion_performance.d
art'; | 16 import 'package:analysis_server/src/services/completion/completion_performance.d
art'; |
| 17 import 'package:analysis_server/src/services/completion/dart/common_usage_sorter
.dart'; | 17 import 'package:analysis_server/src/services/completion/dart/common_usage_sorter
.dart'; |
| 18 import 'package:analysis_server/src/services/completion/dart/contribution_sorter
.dart'; | 18 import 'package:analysis_server/src/services/completion/dart/contribution_sorter
.dart'; |
| 19 import 'package:analysis_server/src/services/completion/dart/optype.dart'; | 19 import 'package:analysis_server/src/services/completion/dart/optype.dart'; |
| 20 import 'package:analysis_server/src/services/search/search_engine.dart'; | 20 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 21 import 'package:analyzer/dart/ast/ast.dart'; | 21 import 'package:analyzer/dart/ast/ast.dart'; |
| 22 import 'package:analyzer/dart/ast/token.dart'; | 22 import 'package:analyzer/dart/ast/token.dart'; |
| 23 import 'package:analyzer/dart/element/element.dart'; | 23 import 'package:analyzer/dart/element/element.dart'; |
| 24 import 'package:analyzer/dart/element/type.dart'; | 24 import 'package:analyzer/dart/element/type.dart'; |
| 25 import 'package:analyzer/exception/exception.dart'; |
| 25 import 'package:analyzer/file_system/file_system.dart'; | 26 import 'package:analyzer/file_system/file_system.dart'; |
| 26 import 'package:analyzer/src/context/context.dart' show AnalysisFutureHelper; | 27 import 'package:analyzer/src/context/context.dart' show AnalysisFutureHelper; |
| 27 import 'package:analyzer/src/dart/ast/token.dart'; | 28 import 'package:analyzer/src/dart/ast/token.dart'; |
| 28 import 'package:analyzer/src/generated/engine.dart'; | 29 import 'package:analyzer/src/generated/engine.dart'; |
| 29 import 'package:analyzer/src/generated/java_engine.dart'; | |
| 30 import 'package:analyzer/src/generated/source.dart'; | 30 import 'package:analyzer/src/generated/source.dart'; |
| 31 import 'package:analyzer/src/task/dart.dart'; | 31 import 'package:analyzer/src/task/dart.dart'; |
| 32 import 'package:analyzer/task/dart.dart'; | 32 import 'package:analyzer/task/dart.dart'; |
| 33 import 'package:analyzer/task/model.dart'; | 33 import 'package:analyzer/task/model.dart'; |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * [DartCompletionManager] determines if a completion request is Dart specific | 36 * [DartCompletionManager] determines if a completion request is Dart specific |
| 37 * and forwards those requests to all [DartCompletionContributor]s. | 37 * and forwards those requests to all [DartCompletionContributor]s. |
| 38 */ | 38 */ |
| 39 class DartCompletionManager implements CompletionContributor { | 39 class DartCompletionManager implements CompletionContributor { |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 if (start <= requestOffset && requestOffset <= end) { | 493 if (start <= requestOffset && requestOffset <= end) { |
| 494 // Replacement range for import URI | 494 // Replacement range for import URI |
| 495 return new ReplacementRange(start, end - start); | 495 return new ReplacementRange(start, end - start); |
| 496 } | 496 } |
| 497 } | 497 } |
| 498 } | 498 } |
| 499 } | 499 } |
| 500 return new ReplacementRange(requestOffset, 0); | 500 return new ReplacementRange(requestOffset, 0); |
| 501 } | 501 } |
| 502 } | 502 } |
| OLD | NEW |