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

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

Issue 2923573002: Move relevance constants for use in plugins (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | pkg/analyzer_plugin/lib/utilities/completion/relevance.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) 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analysis_server/src/provisional/completion/completion_core.dart' ; 7 import 'package:analysis_server/src/provisional/completion/completion_core.dart' ;
8 import 'package:analysis_server/src/provisional/completion/dart/completion_targe t.dart'; 8 import 'package:analysis_server/src/provisional/completion/dart/completion_targe t.dart';
9 import 'package:analysis_server/src/services/completion/dart/optype.dart'; 9 import 'package:analysis_server/src/services/completion/dart/optype.dart';
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
11 import 'package:analyzer/dart/element/element.dart'; 11 import 'package:analyzer/dart/element/element.dart';
12 import 'package:analyzer/dart/element/type.dart'; 12 import 'package:analyzer/dart/element/type.dart';
13 import 'package:analyzer/src/generated/source.dart'; 13 import 'package:analyzer/src/generated/source.dart';
14 import 'package:analyzer_plugin/protocol/protocol_common.dart'; 14 import 'package:analyzer_plugin/protocol/protocol_common.dart';
15 15
16 export 'package:analysis_server/src/provisional/completion/completion_core.dart' 16 export 'package:analysis_server/src/provisional/completion/completion_core.dart'
17 show EMPTY_LIST; 17 show EMPTY_LIST;
18 18 export 'package:analyzer_plugin/utilities/completion/relevance.dart';
19 const int DART_RELEVANCE_COMMON_USAGE = 1200;
20 const int DART_RELEVANCE_DEFAULT = 1000;
21 const int DART_RELEVANCE_HIGH = 2000;
22 const int DART_RELEVANCE_INCREMENT = 100;
23 const int DART_RELEVANCE_INHERITED_ACCESSOR = 1057;
24 const int DART_RELEVANCE_INHERITED_FIELD = 1058;
25 const int DART_RELEVANCE_INHERITED_METHOD = 1057;
26 const int DART_RELEVANCE_KEYWORD = 1055;
27 const int DART_RELEVANCE_LOCAL_ACCESSOR = 1057;
28 const int DART_RELEVANCE_LOCAL_FIELD = 1058;
29 const int DART_RELEVANCE_LOCAL_FUNCTION = 1056;
30 const int DART_RELEVANCE_LOCAL_METHOD = 1057;
31 const int DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE = 1056;
32 const int DART_RELEVANCE_LOCAL_VARIABLE = 1059;
33 const int DART_RELEVANCE_LOW = 500;
34 const int DART_RELEVANCE_NAMED_PARAMETER = 1060;
35 const int DART_RELEVANCE_PARAMETER = 1059;
36 19
37 /** 20 /**
38 * An object used to instantiate a [DartCompletionContributor] instance 21 * An object used to instantiate a [DartCompletionContributor] instance
39 * for each 'completion.getSuggestions' request. 22 * for each 'completion.getSuggestions' request.
40 * Contributors should *not* be cached between requests. 23 * Contributors should *not* be cached between requests.
41 */ 24 */
42 typedef DartCompletionContributor DartCompletionContributorFactory(); 25 typedef DartCompletionContributor DartCompletionContributorFactory();
43 26
44 /** 27 /**
45 * An object used to produce completions 28 * An object used to produce completions
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 SourceFactory get sourceFactory; 93 SourceFactory get sourceFactory;
111 94
112 /** 95 /**
113 * Return the completion target. This determines what part of the parse tree 96 * Return the completion target. This determines what part of the parse tree
114 * will receive the newly inserted text. 97 * will receive the newly inserted text.
115 * At a minimum, all declarations in the completion scope in [target.unit] 98 * At a minimum, all declarations in the completion scope in [target.unit]
116 * will be resolved if they can be resolved. 99 * will be resolved if they can be resolved.
117 */ 100 */
118 CompletionTarget get target; 101 CompletionTarget get target;
119 } 102 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_plugin/lib/utilities/completion/relevance.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698