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

Side by Side Diff: pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart

Issue 1470373002: create new Dart specific completion contributor extension point (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years 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
OLDNEW
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 analysis_server.src.provisional.completion.completion_dart; 5 library analysis_server.src.provisional.completion.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' ;
(...skipping 14 matching lines...) Expand all
25 const int DART_RELEVANCE_LOCAL_FIELD = 1058; 25 const int DART_RELEVANCE_LOCAL_FIELD = 1058;
26 const int DART_RELEVANCE_LOCAL_FUNCTION = 1056; 26 const int DART_RELEVANCE_LOCAL_FUNCTION = 1056;
27 const int DART_RELEVANCE_LOCAL_METHOD = 1057; 27 const int DART_RELEVANCE_LOCAL_METHOD = 1057;
28 const int DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE = 1056; 28 const int DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE = 1056;
29 const int DART_RELEVANCE_LOCAL_VARIABLE = 1059; 29 const int DART_RELEVANCE_LOCAL_VARIABLE = 1059;
30 const int DART_RELEVANCE_LOW = 500; 30 const int DART_RELEVANCE_LOW = 500;
31 const int DART_RELEVANCE_NAMED_PARAMETER = 1060; 31 const int DART_RELEVANCE_NAMED_PARAMETER = 1060;
32 const int DART_RELEVANCE_PARAMETER = 1059; 32 const int DART_RELEVANCE_PARAMETER = 1059;
33 33
34 /** 34 /**
35 * An object used to instantiate [DartCompletionContributor] instances
36 * for each 'completion.getSuggestions' request.
37 * Contributors should *not* be cached between requests.
38 */
39 typedef List<DartCompletionContributor> DartCompletionContributorFactory();
40
41 /**
35 * An object used to produce completions 42 * An object used to produce completions
36 * at a specific location within a Dart file. 43 * at a specific location within a Dart file.
37 * 44 *
38 * Clients may implement this class when implementing plugins. 45 * Clients may implement this class when implementing plugins.
39 */ 46 */
40 abstract class DartCompletionContributor { 47 abstract class DartCompletionContributor {
41 /** 48 /**
42 * Return a [Future] that completes with a list of suggestions 49 * Return a [Future] that completes with a list of suggestions
43 * for the given completion [request]. 50 * for the given completion [request].
44 */ 51 */
(...skipping 16 matching lines...) Expand all
61 /** 68 /**
62 * Return a [Future] that completes with a compilation unit in which 69 * Return a [Future] that completes with a compilation unit in which
63 * all declarations in all scopes containing [target] have been resolved. 70 * all declarations in all scopes containing [target] have been resolved.
64 * The [Future] may return `null` if the unit cannot be resolved 71 * The [Future] may return `null` if the unit cannot be resolved
65 * (e.g. unlinked part file). 72 * (e.g. unlinked part file).
66 * Any information obtained from [target] prior to calling this method 73 * Any information obtained from [target] prior to calling this method
67 * should be discarded as it may have changed. 74 * should be discarded as it may have changed.
68 */ 75 */
69 Future<CompilationUnit> resolveDeclarationsInScope(); 76 Future<CompilationUnit> resolveDeclarationsInScope();
70 } 77 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698