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

Side by Side Diff: pkg/analysis_server/lib/src/services/completion/dart/static_member_contributor.dart

Issue 1527793003: Clean up imports in analysis_server and analyzer_cli (and one missed in analyzer) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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 services.completion.contributor.dart.static_member; 5 library services.completion.contributor.dart.static_member;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
10 import 'package:analysis_server/src/services/completion/dart/suggestion_builder. dart'; 10 import 'package:analysis_server/src/services/completion/dart/suggestion_builder. dart';
11 import 'package:analyzer/dart/element/element.dart';
12 import 'package:analyzer/dart/element/visitor.dart';
11 import 'package:analyzer/src/generated/ast.dart'; 13 import 'package:analyzer/src/generated/ast.dart';
12 import 'package:analyzer/src/generated/element.dart';
13 14
14 import '../../../protocol_server.dart' 15 import '../../../protocol_server.dart'
15 show CompletionSuggestion, CompletionSuggestionKind; 16 show CompletionSuggestion, CompletionSuggestionKind;
16 17
17 /** 18 /**
18 * A contributor for calculating static member invocation / access suggestions 19 * A contributor for calculating static member invocation / access suggestions
19 * `completion.getSuggestions` request results. 20 * `completion.getSuggestions` request results.
20 */ 21 */
21 class StaticMemberContributor extends DartCompletionContributor { 22 class StaticMemberContributor extends DartCompletionContributor {
22 @override 23 @override
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 bool _isSpecialEnumField(FieldElement element) { 135 bool _isSpecialEnumField(FieldElement element) {
135 Element parent = element.enclosingElement; 136 Element parent = element.enclosingElement;
136 if (parent is ClassElement && parent.isEnum) { 137 if (parent is ClassElement && parent.isEnum) {
137 if (element.name == 'values') { 138 if (element.name == 'values') {
138 return true; 139 return true;
139 } 140 }
140 } 141 }
141 return false; 142 return false;
142 } 143 }
143 } 144 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698