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

Side by Side Diff: pkg/analysis_server/test/abstract_context.dart

Issue 725143004: Format and sort analyzer and analysis_server packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 testing.abstract_context; 5 library testing.abstract_context;
6 6
7 import 'mock_sdk.dart';
8 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
9 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
10 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
11 import 'package:analyzer/src/generated/element.dart'; 10 import 'package:analyzer/src/generated/element.dart';
12 import 'package:analyzer/src/generated/engine.dart'; 11 import 'package:analyzer/src/generated/engine.dart';
13 import 'package:analyzer/src/generated/sdk.dart'; 12 import 'package:analyzer/src/generated/sdk.dart';
14 import 'package:analyzer/src/generated/source_io.dart'; 13 import 'package:analyzer/src/generated/source_io.dart';
15 14
15 import 'mock_sdk.dart';
16
16 17
17 /** 18 /**
18 * Finds an [Element] with the given [name]. 19 * Finds an [Element] with the given [name].
19 */ 20 */
20 Element findChildElement(Element root, String name, [ElementKind kind]) { 21 Element findChildElement(Element root, String name, [ElementKind kind]) {
21 Element result = null; 22 Element result = null;
22 root.accept(new _ElementVisitorFunctionWrapper((Element element) { 23 root.accept(new _ElementVisitorFunctionWrapper((Element element) {
23 if (element.name != name) { 24 if (element.name != name) {
24 return; 25 return;
25 } 26 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 * [engine.GeneralizingElementVisitor]. 102 * [engine.GeneralizingElementVisitor].
102 */ 103 */
103 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { 104 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor {
104 final _ElementVisitorFunction function; 105 final _ElementVisitorFunction function;
105 _ElementVisitorFunctionWrapper(this.function); 106 _ElementVisitorFunctionWrapper(this.function);
106 visitElement(Element element) { 107 visitElement(Element element) {
107 function(element); 108 function(element);
108 super.visitElement(element); 109 super.visitElement(element);
109 } 110 }
110 } 111 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/stdio_server.dart ('k') | pkg/analysis_server/test/analysis/notification_errors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698