| 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.dart.local.declaration.visitor; | 5 library services.completion.dart.local.declaration.visitor; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/services/completion/suggestion_builder.dart'
; | 7 import 'package:analysis_server/src/services/completion/suggestion_builder.dart'
; |
| 8 import 'package:analyzer/src/generated/ast.dart'; | 8 import 'package:analyzer/src/generated/ast.dart'; |
| 9 import 'package:analyzer/src/generated/scanner.dart'; | 9 import 'package:analyzer/src/generated/scanner.dart'; |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 param = node.stackTraceParameter; | 103 param = node.stackTraceParameter; |
| 104 if (param != null) { | 104 if (param != null) { |
| 105 declaredParam(param, STACKTRACE_TYPE); | 105 declaredParam(param, STACKTRACE_TYPE); |
| 106 } | 106 } |
| 107 visitNode(node); | 107 visitNode(node); |
| 108 } | 108 } |
| 109 | 109 |
| 110 @override | 110 @override |
| 111 void visitClassDeclaration(ClassDeclaration node) { | 111 void visitClassDeclaration(ClassDeclaration node) { |
| 112 _visitClassDeclarationMembers(node); | 112 _visitClassDeclarationMembers(node); |
| 113 visitInheritedTypes(node, (ClassDeclaration classNode) { | 113 // imported types are handled by the imported reference contributor |
| 114 visitInheritedTypes(node, localDeclaration: (ClassDeclaration classNode) { |
| 114 _visitClassDeclarationMembers(classNode); | 115 _visitClassDeclarationMembers(classNode); |
| 115 }, (String typeName) { | |
| 116 // ignored | |
| 117 }); | 116 }); |
| 118 visitNode(node); | 117 visitNode(node); |
| 119 } | 118 } |
| 120 | 119 |
| 121 @override | 120 @override |
| 122 void visitCompilationUnit(CompilationUnit node) { | 121 void visitCompilationUnit(CompilationUnit node) { |
| 123 node.declarations.forEach((Declaration declaration) { | 122 node.declarations.forEach((Declaration declaration) { |
| 124 if (declaration is ClassDeclaration) { | 123 if (declaration is ClassDeclaration) { |
| 125 declaredClass(declaration); | 124 declaredClass(declaration); |
| 126 } else if (declaration is EnumDeclaration) { | 125 } else if (declaration is EnumDeclaration) { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 }); | 260 }); |
| 262 } | 261 } |
| 263 } | 262 } |
| 264 } | 263 } |
| 265 | 264 |
| 266 /** | 265 /** |
| 267 * Internal exception used to indicate that [LocalDeclarationVisitor] | 266 * Internal exception used to indicate that [LocalDeclarationVisitor] |
| 268 * should stop visiting. | 267 * should stop visiting. |
| 269 */ | 268 */ |
| 270 class _LocalDeclarationVisitorFinished {} | 269 class _LocalDeclarationVisitorFinished {} |
| OLD | NEW |