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

Unified Diff: pkg/analyzer_plugin/test/support/abstract_context.dart

Issue 2873503007: Add support for converting elements to plugin API objects (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_plugin/test/support/abstract_context.dart
diff --git a/pkg/analyzer_plugin/test/support/abstract_context.dart b/pkg/analyzer_plugin/test/support/abstract_context.dart
index 2be9479e79ef5e19faa92fbf26be1e8ca822cf57..9ae61de9cb781faff6d333c89825618396baf364 100644
--- a/pkg/analyzer_plugin/test/support/abstract_context.dart
+++ b/pkg/analyzer_plugin/test/support/abstract_context.dart
@@ -79,7 +79,12 @@ class Required {
driver.addFile(path);
driver.changeFile(path);
_fileContentOverlay[path] = content;
- return null;
+ return provider.getFile(path).createSource();
+ }
+
+ Element findElementInUnit(CompilationUnit unit, String name,
+ [ElementKind kind]) {
+ return findChildElement(unit.element, name, kind);
}
File newFile(String path, [String content]) =>

Powered by Google App Engine
This is Rietveld 408576698