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

Unified Diff: pkg/analysis_server/test/integration/integration_test_methods.dart

Issue 672003002: Add package root setting to analysis server API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/analysis_server/test/integration/integration_test_methods.dart
diff --git a/pkg/analysis_server/test/integration/integration_test_methods.dart b/pkg/analysis_server/test/integration/integration_test_methods.dart
index 743bf3da8c0f4573f369985026c440f18add3acb..cb84c1aef5c25cd8a244d3d6b7a429d932309eeb 100644
--- a/pkg/analysis_server/test/integration/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/integration_test_methods.dart
@@ -269,9 +269,22 @@ abstract class IntegrationTestMixin {
*
* A list of the files and directories within the included directories that
* should not be analyzed.
+ *
+ * packageRoots ( optional Map<FilePath, FilePath> )
+ *
+ * A mapping from source directories to target directories that should
+ * override the normal package: URI resolution mechanism. The analyzer will
+ * behave as though each source directory in the map contains a special
+ * pubspec.yaml file which resolves any package: URI to the corresponding
+ * path within the target directory. The effect is the same as specifying
+ * the target directory as a "--package_root" parameter to the Dart VM when
+ * executing any Dart file inside the source directory.
+ *
+ * If this field is absent, or the empty map is specified, then all
+ * package: URI's are resolved the normal pubspec.yaml mechanism.
*/
- Future sendAnalysisSetAnalysisRoots(List<String> included, List<String> excluded) {
- var params = new AnalysisSetAnalysisRootsParams(included, excluded).toJson();
+ Future sendAnalysisSetAnalysisRoots(List<String> included, List<String> excluded, {Map<String, String> packageRoots}) {
+ var params = new AnalysisSetAnalysisRootsParams(included, excluded, packageRoots: packageRoots).toJson();
return server.send("analysis.setAnalysisRoots", params)
.then((result) {
expect(result, isNull);

Powered by Google App Engine
This is Rietveld 408576698