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

Unified Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 2615903002: Call processOptionsForDriver() before creating the driver. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/context_manager.dart
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index dc318fcb44d1afa3d2d4b590951da4e4c4f6a139..c8faf136a6c2544c1419e540ba633c7dd3e72f3c 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -716,11 +716,11 @@ class ContextManagerImpl implements ContextManager {
/**
* Process [options] for the given context [info].
*/
- void processOptionsForDriver(ContextInfo info, Map<String, Object> options) {
+ void processOptionsForDriver(ContextInfo info,
+ AnalysisOptionsImpl analysisOptions, Map<String, Object> options) {
if (options == null) {
return;
}
- AnalysisOptionsImpl analysisOptions = info.analysisDriver.analysisOptions;
// Check for embedded options.
Map embeddedOptions = _getEmbeddedOptions(info);
@@ -1165,30 +1165,12 @@ class ContextManagerImpl implements ContextManager {
info.setDependencies(dependencies);
if (enableNewAnalysisDriver) {
+ processOptionsForDriver(info, options, optionMap);
info.analysisDriver = callbacks.addAnalysisDriver(folder, options);
} else {
info.context = callbacks.addContext(folder, options);
_folderMap[folder] = info.context;
info.context.name = folder.path;
- }
-
- // Look for pubspec-specified analysis configuration.
- File pubspec;
- if (packagespecFile?.exists == true) {
- if (packagespecFile.shortName == PUBSPEC_NAME) {
- pubspec = packagespecFile;
- }
- }
- if (pubspec == null) {
- Resource child = folder.getChild(PUBSPEC_NAME);
- if (child.exists && child is File) {
- pubspec = child;
- }
- }
-
- if (enableNewAnalysisDriver) {
- processOptionsForDriver(info, optionMap);
- } else {
processOptionsForContext(info, optionMap);
}
« 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