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

Side by Side Diff: pkg/analysis_server/test/context_manager_test.dart

Issue 2522543007: Remove uses of configuration data (Closed)
Patch Set: clean-up Created 4 years, 1 month 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
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 test.context.directory.manager; 5 library test.context.directory.manager;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/src/context_manager.dart'; 9 import 'package:analysis_server/src/context_manager.dart';
10 import 'package:analyzer/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
11 import 'package:analyzer/file_system/file_system.dart'; 11 import 'package:analyzer/file_system/file_system.dart';
12 import 'package:analyzer/file_system/memory_file_system.dart'; 12 import 'package:analyzer/file_system/memory_file_system.dart';
13 import 'package:analyzer/instrumentation/instrumentation.dart'; 13 import 'package:analyzer/instrumentation/instrumentation.dart';
14 import 'package:analyzer/source/error_processor.dart'; 14 import 'package:analyzer/source/error_processor.dart';
15 import 'package:analyzer/src/context/builder.dart'; 15 import 'package:analyzer/src/context/builder.dart';
16 import 'package:analyzer/src/dart/analysis/driver.dart'; 16 import 'package:analyzer/src/dart/analysis/driver.dart';
17 import 'package:analyzer/src/error/codes.dart'; 17 import 'package:analyzer/src/error/codes.dart';
18 import 'package:analyzer/src/generated/engine.dart'; 18 import 'package:analyzer/src/generated/engine.dart';
19 import 'package:analyzer/src/generated/sdk.dart'; 19 import 'package:analyzer/src/generated/sdk.dart';
20 import 'package:analyzer/src/generated/source.dart'; 20 import 'package:analyzer/src/generated/source.dart';
21 import 'package:analyzer/src/generated/source_io.dart'; 21 import 'package:analyzer/src/generated/source_io.dart';
22 import 'package:analyzer/src/services/lint.dart'; 22 import 'package:analyzer/src/services/lint.dart';
23 import 'package:analyzer/src/task/options.dart'
24 show CONFIGURED_ERROR_PROCESSORS;
25 import 'package:analyzer/src/util/glob.dart'; 23 import 'package:analyzer/src/util/glob.dart';
26 import 'package:linter/src/plugin/linter_plugin.dart'; 24 import 'package:linter/src/plugin/linter_plugin.dart';
27 import 'package:linter/src/rules/avoid_as.dart'; 25 import 'package:linter/src/rules/avoid_as.dart';
28 import 'package:path/path.dart' as path; 26 import 'package:path/path.dart' as path;
29 import 'package:plugin/manager.dart'; 27 import 'package:plugin/manager.dart';
30 import 'package:plugin/plugin.dart'; 28 import 'package:plugin/plugin.dart';
31 import 'package:test/test.dart'; 29 import 'package:test/test.dart';
32 import 'package:test_reflective_loader/test_reflective_loader.dart'; 30 import 'package:test_reflective_loader/test_reflective_loader.dart';
33 31
34 import 'mock_sdk.dart'; 32 import 'mock_sdk.dart';
(...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 '**/*.${AnalysisEngine.SUFFIX_HTML}', 1738 '**/*.${AnalysisEngine.SUFFIX_HTML}',
1741 '**/*.${AnalysisEngine.SUFFIX_HTM}', 1739 '**/*.${AnalysisEngine.SUFFIX_HTM}',
1742 '**/${AnalysisEngine.ANALYSIS_OPTIONS_FILE}', 1740 '**/${AnalysisEngine.ANALYSIS_OPTIONS_FILE}',
1743 '**/${AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE}' 1741 '**/${AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE}'
1744 ]; 1742 ];
1745 return patterns 1743 return patterns
1746 .map((pattern) => new Glob(path.posix.separator, pattern)) 1744 .map((pattern) => new Glob(path.posix.separator, pattern))
1747 .toList(); 1745 .toList();
1748 } 1746 }
1749 1747
1750 List<ErrorProcessor> get errorProcessors => callbacks.currentContext 1748 List<ErrorProcessor> get errorProcessors =>
1751 .getConfigurationData(CONFIGURED_ERROR_PROCESSORS); 1749 callbacks.currentContext.analysisOptions.errorProcessors;
1752 1750
1753 List<Linter> get lints => getLints(callbacks.currentContext); 1751 List<Linter> get lints => getLints(callbacks.currentContext);
1754 1752
1755 AnalysisOptions get options => callbacks.currentContext.analysisOptions; 1753 AnalysisOptions get options => callbacks.currentContext.analysisOptions;
1756 1754
1757 Map<String, List<Folder>> get _currentPackageMap => _packageMap(projPath); 1755 Map<String, List<Folder>> get _currentPackageMap => _packageMap(projPath);
1758 1756
1759 void deleteFile(List<String> pathComponents) { 1757 void deleteFile(List<String> pathComponents) {
1760 String filePath = path.posix.joinAll(pathComponents); 1758 String filePath = path.posix.joinAll(pathComponents);
1761 resourceProvider.deleteFile(filePath); 1759 resourceProvider.deleteFile(filePath);
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
2592 class TestUriResolver extends UriResolver { 2590 class TestUriResolver extends UriResolver {
2593 Map<Uri, Source> uriMap; 2591 Map<Uri, Source> uriMap;
2594 2592
2595 TestUriResolver(this.uriMap); 2593 TestUriResolver(this.uriMap);
2596 2594
2597 @override 2595 @override
2598 Source resolveAbsolute(Uri uri, [Uri actualUri]) { 2596 Source resolveAbsolute(Uri uri, [Uri actualUri]) {
2599 return uriMap[uri]; 2597 return uriMap[uri];
2600 } 2598 }
2601 } 2599 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/status/get_handler.dart ('k') | pkg/analyzer/lib/source/error_processor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698