| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library services.completion; | 8 library services.completion; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 import 'package:analyzer/src/generated/sdk.dart'; | 24 import 'package:analyzer/src/generated/sdk.dart'; |
| 25 import 'package:analyzer/src/generated/source_io.dart'; | 25 import 'package:analyzer/src/generated/source_io.dart'; |
| 26 import 'package:analyzer/src/generated/utilities_dart.dart'; | 26 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 27 | 27 |
| 28 import 'stubs.dart'; | 28 import 'stubs.dart'; |
| 29 import 'util.dart'; | 29 import 'util.dart'; |
| 30 | 30 |
| 31 class AstNodeClassifier_CompletionEngine_typeOf extends CompletionEngine_AstNode
Classifier { | 31 class AstNodeClassifier_CompletionEngine_typeOf extends CompletionEngine_AstNode
Classifier { |
| 32 final CompletionEngine CompletionEngine_this; | 32 final CompletionEngine CompletionEngine_this; |
| 33 | 33 |
| 34 List<DartType> result; | 34 DartType result = null; |
| 35 | 35 |
| 36 AstNodeClassifier_CompletionEngine_typeOf(this.CompletionEngine_this, this.res
ult) : super(); | 36 AstNodeClassifier_CompletionEngine_typeOf(this.CompletionEngine_this); |
| 37 | 37 |
| 38 @override | 38 @override |
| 39 Object visitPrefixedIdentifier(PrefixedIdentifier node) => visitSimpleIdentifi
er(node.identifier); | 39 Object visitPrefixedIdentifier(PrefixedIdentifier node) => visitSimpleIdentifi
er(node.identifier); |
| 40 | 40 |
| 41 @override | 41 @override |
| 42 Object visitSimpleIdentifier(SimpleIdentifier node) { | 42 Object visitSimpleIdentifier(SimpleIdentifier node) { |
| 43 Element elem = node.bestElement; | 43 Element elem = node.bestElement; |
| 44 if (elem != null && elem.kind == ElementKind.GETTER) { | 44 if (elem != null && elem.kind == ElementKind.GETTER) { |
| 45 PropertyAccessorElement accessor = elem as PropertyAccessorElement; | 45 PropertyAccessorElement accessor = elem as PropertyAccessorElement; |
| 46 if (accessor.isSynthetic) { | 46 if (accessor.isSynthetic) { |
| 47 PropertyInducingElement var2 = accessor.variable; | 47 PropertyInducingElement var2 = accessor.variable; |
| 48 result[0] = CompletionEngine_this._typeSearch(var2); | 48 result = CompletionEngine_this._typeSearch(var2); |
| 49 } | 49 } |
| 50 } | 50 } |
| 51 return null; | 51 return null; |
| 52 } | 52 } |
| 53 } | 53 } |
| 54 | 54 |
| 55 /** | 55 /** |
| 56 * The analysis engine for code completion. | 56 * The analysis engine for code completion. |
| 57 * | 57 * |
| 58 * Note: During development package-private methods are used to group element-sp
ecific completion | 58 * Note: During development package-private methods are used to group element-sp
ecific completion |
| (...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1400 } | 1400 } |
| 1401 } | 1401 } |
| 1402 break; | 1402 break; |
| 1403 } | 1403 } |
| 1404 return receiverType; | 1404 return receiverType; |
| 1405 } | 1405 } |
| 1406 | 1406 |
| 1407 DartType _typeOf2(Expression expr) { | 1407 DartType _typeOf2(Expression expr) { |
| 1408 DartType type = expr.bestType; | 1408 DartType type = expr.bestType; |
| 1409 if (type.isDynamic) { | 1409 if (type.isDynamic) { |
| 1410 List<DartType> result = new List<DartType>(1); | 1410 AstNodeClassifier_CompletionEngine_typeOf visitor |
| 1411 CompletionEngine_AstNodeClassifier visitor = new AstNodeClassifier_Complet
ionEngine_typeOf(this, result); | 1411 = new AstNodeClassifier_CompletionEngine_typeOf(this); |
| 1412 expr.accept(visitor); | 1412 expr.accept(visitor); |
| 1413 if (result[0] != null) { | 1413 DartType result = visitor.result; |
| 1414 return result[0]; | 1414 if (result != null) { |
| 1415 return result; |
| 1415 } | 1416 } |
| 1416 } | 1417 } |
| 1417 return type; | 1418 return type; |
| 1418 } | 1419 } |
| 1419 | 1420 |
| 1420 DartType _typeOfContainingClass(AstNode node) { | 1421 DartType _typeOfContainingClass(AstNode node) { |
| 1421 AstNode parent = node; | 1422 AstNode parent = node; |
| 1422 while (parent != null) { | 1423 while (parent != null) { |
| 1423 if (parent is ClassDeclaration) { | 1424 if (parent is ClassDeclaration) { |
| 1424 return (parent as ClassDeclaration).element.type; | 1425 return (parent as ClassDeclaration).element.type; |
| (...skipping 2265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3690 | 3691 |
| 3691 class TopLevelNamesKind extends Enum<TopLevelNamesKind> { | 3692 class TopLevelNamesKind extends Enum<TopLevelNamesKind> { |
| 3692 static const TopLevelNamesKind DECLARED_AND_IMPORTS = const TopLevelNamesKind(
'DECLARED_AND_IMPORTS', 0); | 3693 static const TopLevelNamesKind DECLARED_AND_IMPORTS = const TopLevelNamesKind(
'DECLARED_AND_IMPORTS', 0); |
| 3693 | 3694 |
| 3694 static const TopLevelNamesKind DECLARED_AND_EXPORTS = const TopLevelNamesKind(
'DECLARED_AND_EXPORTS', 1); | 3695 static const TopLevelNamesKind DECLARED_AND_EXPORTS = const TopLevelNamesKind(
'DECLARED_AND_EXPORTS', 1); |
| 3695 | 3696 |
| 3696 static const List<TopLevelNamesKind> values = const [DECLARED_AND_IMPORTS, DEC
LARED_AND_EXPORTS]; | 3697 static const List<TopLevelNamesKind> values = const [DECLARED_AND_IMPORTS, DEC
LARED_AND_EXPORTS]; |
| 3697 | 3698 |
| 3698 const TopLevelNamesKind(String name, int ordinal) : super(name, ordinal); | 3699 const TopLevelNamesKind(String name, int ordinal) : super(name, ordinal); |
| 3699 } | 3700 } |
| OLD | NEW |