| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library services.completion.computer; |
| 6 |
| 7 import 'dart:async'; |
| 8 |
| 9 import 'package:analysis_services/completion/completion_suggestion.dart'; |
| 10 import 'package:analysis_services/src/completion/top_level_computer.dart'; |
| 11 import 'package:analysis_services/search/search_engine.dart'; |
| 12 |
| 13 /** |
| 14 * The base class for computing code completion suggestions. |
| 15 */ |
| 16 abstract class CompletionComputer { |
| 17 |
| 18 /** |
| 19 * Create a collection of code completion computers for the given situation. |
| 20 */ |
| 21 static Future<List<CompletionComputer>> create(SearchEngine searchEngine) { |
| 22 List<CompletionComputer> computers = []; |
| 23 computers.add(new TopLevelComputer(searchEngine)); |
| 24 return new Future.value(computers); |
| 25 } |
| 26 |
| 27 /** |
| 28 * Computes [CompletionSuggestion]s for the specified position in the source. |
| 29 */ |
| 30 Future<List<CompletionSuggestion>> compute(); |
| 31 } |
| OLD | NEW |