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.suggestion; | 5 library services.completion.suggestion; |
6 | 6 |
7 import 'package:analysis_services/constants.dart'; | 7 import 'package:analysis_server/src/services/constants.dart'; |
8 import 'package:analysis_services/json.dart'; | 8 import 'package:analysis_server/src/services/json.dart'; |
9 import 'package:analyzer/src/generated/element.dart'; | 9 import 'package:analyzer/src/generated/element.dart'; |
10 | 10 |
11 /** | 11 /** |
12 * An enumeration of the relevance of a completion suggestion. | 12 * An enumeration of the relevance of a completion suggestion. |
13 */ | 13 */ |
14 class CompletionRelevance { | 14 class CompletionRelevance { |
15 static const CompletionRelevance LOW = const CompletionRelevance('LOW'); | 15 static const CompletionRelevance LOW = const CompletionRelevance('LOW'); |
16 static const CompletionRelevance DEFAULT = | 16 static const CompletionRelevance DEFAULT = |
17 const CompletionRelevance('DEFAULT'); | 17 const CompletionRelevance('DEFAULT'); |
18 static const CompletionRelevance HIGH = const CompletionRelevance('HIGH'); | 18 static const CompletionRelevance HIGH = const CompletionRelevance('HIGH'); |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 if (METHOD_NAME.name == name) return METHOD_NAME; | 228 if (METHOD_NAME.name == name) return METHOD_NAME; |
229 if (NAMED_ARGUMENT.name == name) return NAMED_ARGUMENT; | 229 if (NAMED_ARGUMENT.name == name) return NAMED_ARGUMENT; |
230 if (OPTIONAL_ARGUMENT.name == name) return OPTIONAL_ARGUMENT; | 230 if (OPTIONAL_ARGUMENT.name == name) return OPTIONAL_ARGUMENT; |
231 if (PARAMETER.name == name) return PARAMETER; | 231 if (PARAMETER.name == name) return PARAMETER; |
232 if (SETTER.name == name) return SETTER; | 232 if (SETTER.name == name) return SETTER; |
233 if (TOP_LEVEL_VARIABLE.name == name) return TOP_LEVEL_VARIABLE; | 233 if (TOP_LEVEL_VARIABLE.name == name) return TOP_LEVEL_VARIABLE; |
234 if (TYPE_PARAMETER.name == name) return TYPE_PARAMETER; | 234 if (TYPE_PARAMETER.name == name) return TYPE_PARAMETER; |
235 throw new ArgumentError('Unknown CompletionSuggestionKind: $name'); | 235 throw new ArgumentError('Unknown CompletionSuggestionKind: $name'); |
236 } | 236 } |
237 } | 237 } |
OLD | NEW |