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

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

Issue 2879273002: Make server use the common protocol classes (Closed)
Patch Set: Created 3 years, 7 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
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.label;
6
7 import 'dart:async'; 5 import 'dart:async';
8 6
9 import 'package:analysis_server/protocol/protocol_generated.dart' as protocol
10 show ElementKind;
11 import 'package:analysis_server/src/protocol_server.dart' 7 import 'package:analysis_server/src/protocol_server.dart'
12 show CompletionSuggestion, CompletionSuggestionKind; 8 show CompletionSuggestion, CompletionSuggestionKind;
13 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
14 import 'package:analysis_server/src/services/completion/dart/completion_manager. dart' 10 import 'package:analysis_server/src/services/completion/dart/completion_manager. dart'
15 show DartCompletionRequestImpl; 11 show DartCompletionRequestImpl;
16 import 'package:analysis_server/src/services/completion/dart/local_declaration_v isitor.dart' 12 import 'package:analysis_server/src/services/completion/dart/local_declaration_v isitor.dart'
17 show LocalDeclarationVisitor; 13 show LocalDeclarationVisitor;
18 import 'package:analysis_server/src/services/completion/dart/optype.dart'; 14 import 'package:analysis_server/src/services/completion/dart/optype.dart';
19 import 'package:analysis_server/src/services/completion/dart/utilities.dart'; 15 import 'package:analysis_server/src/services/completion/dart/utilities.dart';
20 import 'package:analyzer/dart/ast/ast.dart'; 16 import 'package:analyzer/dart/ast/ast.dart';
17 import 'package:analyzer_plugin/protocol/protocol_common.dart' as protocol
18 show ElementKind;
21 19
22 /** 20 /**
23 * A contributor for calculating label suggestions. 21 * A contributor for calculating label suggestions.
24 */ 22 */
25 class LabelContributor extends DartCompletionContributor { 23 class LabelContributor extends DartCompletionContributor {
26 @override 24 @override
27 Future<List<CompletionSuggestion>> computeSuggestions( 25 Future<List<CompletionSuggestion>> computeSuggestions(
28 DartCompletionRequest request) async { 26 DartCompletionRequest request) async {
29 OpType optype = (request as DartCompletionRequestImpl).opType; 27 OpType optype = (request as DartCompletionRequestImpl).opType;
30 28
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 0, 147 0,
150 false, 148 false,
151 false); 149 false);
152 suggestions.add(suggestion); 150 suggestions.add(suggestion);
153 return suggestion; 151 return suggestion;
154 } 152 }
155 } 153 }
156 return null; 154 return null;
157 } 155 }
158 } 156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698