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

Side by Side Diff: pkg/analyzer_plugin/test/support/abstract_context.dart

Issue 2926173002: Try again to fix the bots (TBR) (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/dart/element/visitor.dart'; 9 import 'package:analyzer/dart/element/visitor.dart';
10 import 'package:analyzer/exception/exception.dart'; 10 import 'package:analyzer/exception/exception.dart';
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 '''); 76 ''');
77 77
78 Source addPackageSource(String packageName, String filePath, String content) { 78 Source addPackageSource(String packageName, String filePath, String content) {
79 packageMap[packageName] = [(newFolder('/pubcache/$packageName'))]; 79 packageMap[packageName] = [(newFolder('/pubcache/$packageName'))];
80 File file = newFile('/pubcache/$packageName/$filePath', content); 80 File file = newFile('/pubcache/$packageName/$filePath', content);
81 return file.createSource(); 81 return file.createSource();
82 } 82 }
83 83
84 Source addSource(String path, String content, [Uri uri]) { 84 Source addSource(String path, String content, [Uri uri]) {
85 if (path.startsWith('/')) {
86 path = provider.convertPath(path);
87 }
85 driver.addFile(path); 88 driver.addFile(path);
86 driver.changeFile(path); 89 driver.changeFile(path);
87 _fileContentOverlay[path] = content; 90 _fileContentOverlay[path] = content;
88 return provider.getFile(path).createSource(); 91 return provider.getFile(path).createSource();
89 } 92 }
90 93
91 Element findElementInUnit(CompilationUnit unit, String name, 94 Element findElementInUnit(CompilationUnit unit, String name,
92 [ElementKind kind]) { 95 [ElementKind kind]) {
93 return findChildElement(unit.element, name, kind); 96 return findChildElement(unit.element, name, kind);
94 } 97 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 final _ElementVisitorFunction function; 179 final _ElementVisitorFunction function;
177 180
178 _ElementVisitorFunctionWrapper(this.function); 181 _ElementVisitorFunctionWrapper(this.function);
179 182
180 @override 183 @override
181 visitElement(Element element) { 184 visitElement(Element element) {
182 function(element); 185 function(element);
183 super.visitElement(element); 186 super.visitElement(element);
184 } 187 }
185 } 188 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698