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

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

Issue 2539243002: Transition analyzer and analysis_server to new astFactory; remove old AST factory methods. (Closed)
Patch Set: Update CHANGELOG Created 4 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.label; 5 library services.completion.contributor.dart.label;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol 9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
10 show Element, ElementKind; 10 show Element, ElementKind;
11 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 11 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
12 import 'package:analysis_server/src/services/completion/dart/completion_manager. dart' 12 import 'package:analysis_server/src/services/completion/dart/completion_manager. dart'
13 show DartCompletionRequestImpl; 13 show DartCompletionRequestImpl;
14 import 'package:analysis_server/src/services/completion/dart/local_declaration_v isitor.dart' 14 import 'package:analysis_server/src/services/completion/dart/local_declaration_v isitor.dart'
15 show LocalDeclarationVisitor; 15 show LocalDeclarationVisitor;
16 import 'package:analysis_server/src/services/completion/dart/optype.dart'; 16 import 'package:analysis_server/src/services/completion/dart/optype.dart';
17 import 'package:analyzer/dart/ast/ast.dart'; 17 import 'package:analyzer/dart/ast/ast.dart';
18 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
18 import 'package:analyzer/dart/ast/token.dart'; 19 import 'package:analyzer/dart/ast/token.dart';
19 import 'package:analyzer/src/dart/ast/token.dart'; 20 import 'package:analyzer/src/dart/ast/token.dart';
20 import 'package:analyzer/src/generated/source.dart'; 21 import 'package:analyzer/src/generated/source.dart';
21 22
22 import '../../../protocol_server.dart' 23 import '../../../protocol_server.dart'
23 show CompletionSuggestion, CompletionSuggestionKind, Location; 24 show CompletionSuggestion, CompletionSuggestionKind, Location;
24 25
25 const DYNAMIC = 'dynamic'; 26 const DYNAMIC = 'dynamic';
26 27
27 final TypeName NO_RETURN_TYPE = new TypeName( 28 final TypeName NO_RETURN_TYPE = astFactory.typeName(
28 new SimpleIdentifier(new StringToken(TokenType.IDENTIFIER, '', 0)), null); 29 astFactory.simpleIdentifier(new StringToken(TokenType.IDENTIFIER, '', 0)),
30 null);
29 31
30 /** 32 /**
31 * Create a new protocol Element for inclusion in a completion suggestion. 33 * Create a new protocol Element for inclusion in a completion suggestion.
32 */ 34 */
33 protocol.Element createLocalElement( 35 protocol.Element createLocalElement(
34 Source source, protocol.ElementKind kind, SimpleIdentifier id, 36 Source source, protocol.ElementKind kind, SimpleIdentifier id,
35 {String parameters, 37 {String parameters,
36 TypeName returnType, 38 TypeName returnType,
37 bool isAbstract: false, 39 bool isAbstract: false,
38 bool isDeprecated: false}) { 40 bool isDeprecated: false}) {
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 0, 280 0,
279 false, 281 false,
280 false); 282 false);
281 suggestions.add(suggestion); 283 suggestions.add(suggestion);
282 return suggestion; 284 return suggestion;
283 } 285 }
284 } 286 }
285 return null; 287 return null;
286 } 288 }
287 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698