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

Side by Side Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 1400473004: Options plugin initialization fix. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/context_manager_test.dart » ('j') | 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) 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 context.directory.manager; 5 library context.directory.manager;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:core' hide Resource; 10 import 'dart:core' hide Resource;
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 for (ContextInfo info in _rootInfo.children) { 456 for (ContextInfo info in _rootInfo.children) {
457 if (info.folder.contains(path)) { 457 if (info.folder.contains(path)) {
458 return true; 458 return true;
459 } 459 }
460 } 460 }
461 // no 461 // no
462 return false; 462 return false;
463 } 463 }
464 464
465 /** 465 /**
466 * Process [options] for the context having info [info]. 466 * Process [options] for the given context [info].
467 */ 467 */
468 void processOptionsForContext( 468 void processOptionsForContext(
469 ContextInfo info, Map<String, YamlNode> options) { 469 ContextInfo info, Map<String, YamlNode> options) {
470 if (options == null) { 470 if (options == null) {
471 return; 471 return;
472 } 472 }
473 473
474 // Notify options processors. 474 // Notify options processors.
475 // TODO(pq): breaks AbstractContextManager tests 475 AnalysisEngine.instance.optionsPlugin.optionsProcessors.forEach(
476 // AnalysisEngine.instance.optionsPlugin.optionsProcessors.forEach( 476 (OptionsProcessor p) => p.optionsProcessed(info.context, options));
477 // (OptionsProcessor p) => p.optionsProcessed(info.context, options));
478 477
479 // Analysis options are processed 'in-line'. 478 // Analysis options are processed 'in-line'.
480 // TODO(pq): consider pushing exclude handling into a plugin. 479 // TODO(pq): consider pushing exclude handling into a plugin.
481 YamlMap analyzer = options['analyzer']; 480 YamlMap analyzer = options['analyzer'];
482 if (analyzer == null) { 481 if (analyzer == null) {
483 // No options for analyzer. 482 // No options for analyzer.
484 return; 483 return;
485 } 484 }
486 485
487 // Set ignore patterns. 486 // Set ignore patterns.
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 var path = resourceProvider.pathContext.fromUri(uri); 1425 var path = resourceProvider.pathContext.fromUri(uri);
1427 packageMap[name] = <Folder>[resourceProvider.getFolder(path)]; 1426 packageMap[name] = <Folder>[resourceProvider.getFolder(path)];
1428 } 1427 }
1429 }); 1428 });
1430 return <UriResolver>[new SdkExtUriResolver(packageMap)]; 1429 return <UriResolver>[new SdkExtUriResolver(packageMap)];
1431 } else { 1430 } else {
1432 return const <UriResolver>[]; 1431 return const <UriResolver>[];
1433 } 1432 }
1434 } 1433 }
1435 } 1434 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698