| OLD | NEW |
| 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 analysis.server; | 5 library analysis.server; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:core' hide Resource; | 9 import 'dart:core' hide Resource; |
| 10 import 'dart:math' show max; | 10 import 'dart:math' show max; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 import 'package:analyzer/source/pub_package_map_provider.dart'; | 26 import 'package:analyzer/source/pub_package_map_provider.dart'; |
| 27 import 'package:analyzer/src/generated/ast.dart'; | 27 import 'package:analyzer/src/generated/ast.dart'; |
| 28 import 'package:analyzer/src/generated/element.dart'; | 28 import 'package:analyzer/src/generated/element.dart'; |
| 29 import 'package:analyzer/src/generated/engine.dart'; | 29 import 'package:analyzer/src/generated/engine.dart'; |
| 30 import 'package:analyzer/src/generated/java_engine.dart'; | 30 import 'package:analyzer/src/generated/java_engine.dart'; |
| 31 import 'package:analyzer/src/generated/java_io.dart'; | 31 import 'package:analyzer/src/generated/java_io.dart'; |
| 32 import 'package:analyzer/src/generated/sdk.dart'; | 32 import 'package:analyzer/src/generated/sdk.dart'; |
| 33 import 'package:analyzer/src/generated/source.dart'; | 33 import 'package:analyzer/src/generated/source.dart'; |
| 34 import 'package:analyzer/src/generated/source_io.dart'; | 34 import 'package:analyzer/src/generated/source_io.dart'; |
| 35 import 'package:analyzer/src/generated/utilities_general.dart'; | 35 import 'package:analyzer/src/generated/utilities_general.dart'; |
| 36 import 'package:glob/glob.dart'; | 36 import 'package:analyzer/src/util/glob.dart'; |
| 37 import 'package:plugin/plugin.dart'; | 37 import 'package:plugin/plugin.dart'; |
| 38 | 38 |
| 39 typedef void OptionUpdater(AnalysisOptionsImpl options); | 39 typedef void OptionUpdater(AnalysisOptionsImpl options); |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * Enum representing reasons why analysis might be done for a given file. | 42 * Enum representing reasons why analysis might be done for a given file. |
| 43 */ | 43 */ |
| 44 class AnalysisDoneReason { | 44 class AnalysisDoneReason { |
| 45 /** | 45 /** |
| 46 * Analysis of the file completed successfully. | 46 * Analysis of the file completed successfully. |
| (...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1424 /** | 1424 /** |
| 1425 * Return a list of the globs used to determine which files should be analyzed
. | 1425 * Return a list of the globs used to determine which files should be analyzed
. |
| 1426 */ | 1426 */ |
| 1427 List<Glob> get analyzedFilesGlobs { | 1427 List<Glob> get analyzedFilesGlobs { |
| 1428 if (_analyzedFilesGlobs == null) { | 1428 if (_analyzedFilesGlobs == null) { |
| 1429 _analyzedFilesGlobs = <Glob>[]; | 1429 _analyzedFilesGlobs = <Glob>[]; |
| 1430 List<String> patterns = analysisServer.serverPlugin.analyzedFilePatterns; | 1430 List<String> patterns = analysisServer.serverPlugin.analyzedFilePatterns; |
| 1431 for (String pattern in patterns) { | 1431 for (String pattern in patterns) { |
| 1432 try { | 1432 try { |
| 1433 _analyzedFilesGlobs | 1433 _analyzedFilesGlobs |
| 1434 .add(new Glob(pattern, context: JavaFile.pathContext)); | 1434 .add(new Glob(JavaFile.pathContext.separator, pattern)); |
| 1435 } catch (exception, stackTrace) { | 1435 } catch (exception, stackTrace) { |
| 1436 AnalysisEngine.instance.logger.logError( | 1436 AnalysisEngine.instance.logger.logError( |
| 1437 'Invalid glob pattern: "$pattern"', | 1437 'Invalid glob pattern: "$pattern"', |
| 1438 new CaughtException(exception, stackTrace)); | 1438 new CaughtException(exception, stackTrace)); |
| 1439 } | 1439 } |
| 1440 } | 1440 } |
| 1441 } | 1441 } |
| 1442 return _analyzedFilesGlobs; | 1442 return _analyzedFilesGlobs; |
| 1443 } | 1443 } |
| 1444 | 1444 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 /** | 1640 /** |
| 1641 * The [PerformanceTag] for time spent in server request handlers. | 1641 * The [PerformanceTag] for time spent in server request handlers. |
| 1642 */ | 1642 */ |
| 1643 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 1643 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 1644 | 1644 |
| 1645 /** | 1645 /** |
| 1646 * The [PerformanceTag] for time spent in split store microtasks. | 1646 * The [PerformanceTag] for time spent in split store microtasks. |
| 1647 */ | 1647 */ |
| 1648 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1648 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 1649 } | 1649 } |
| OLD | NEW |