| 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'; | 9 import 'dart:core'; |
| 10 import 'dart:io' as io; | 10 import 'dart:io' as io; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 import 'package:analyzer/src/dart/element/ast_provider.dart'; | 62 import 'package:analyzer/src/dart/element/ast_provider.dart'; |
| 63 import 'package:analyzer/src/generated/engine.dart'; | 63 import 'package:analyzer/src/generated/engine.dart'; |
| 64 import 'package:analyzer/src/generated/sdk.dart'; | 64 import 'package:analyzer/src/generated/sdk.dart'; |
| 65 import 'package:analyzer/src/generated/source.dart'; | 65 import 'package:analyzer/src/generated/source.dart'; |
| 66 import 'package:analyzer/src/generated/source_io.dart'; | 66 import 'package:analyzer/src/generated/source_io.dart'; |
| 67 import 'package:analyzer/src/generated/utilities_general.dart'; | 67 import 'package:analyzer/src/generated/utilities_general.dart'; |
| 68 import 'package:analyzer/src/task/dart.dart'; | 68 import 'package:analyzer/src/task/dart.dart'; |
| 69 import 'package:analyzer/src/util/glob.dart'; | 69 import 'package:analyzer/src/util/glob.dart'; |
| 70 import 'package:analyzer/task/dart.dart'; | 70 import 'package:analyzer/task/dart.dart'; |
| 71 import 'package:plugin/plugin.dart'; | 71 import 'package:plugin/plugin.dart'; |
| 72 import 'package:watcher/watcher.dart'; |
| 72 | 73 |
| 73 typedef void OptionUpdater(AnalysisOptionsImpl options); | 74 typedef void OptionUpdater(AnalysisOptionsImpl options); |
| 74 | 75 |
| 75 /** | 76 /** |
| 76 * Enum representing reasons why analysis might be done for a given file. | 77 * Enum representing reasons why analysis might be done for a given file. |
| 77 */ | 78 */ |
| 78 class AnalysisDoneReason { | 79 class AnalysisDoneReason { |
| 79 /** | 80 /** |
| 80 * Analysis of the file completed successfully. | 81 * Analysis of the file completed successfully. |
| 81 */ | 82 */ |
| (...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2099 } | 2100 } |
| 2100 } | 2101 } |
| 2101 | 2102 |
| 2102 @override | 2103 @override |
| 2103 void applyFileRemoved(nd.AnalysisDriver driver, String file) { | 2104 void applyFileRemoved(nd.AnalysisDriver driver, String file) { |
| 2104 driver.removeFile(file); | 2105 driver.removeFile(file); |
| 2105 sendAnalysisNotificationFlushResults(analysisServer, [file]); | 2106 sendAnalysisNotificationFlushResults(analysisServer, [file]); |
| 2106 } | 2107 } |
| 2107 | 2108 |
| 2108 @override | 2109 @override |
| 2110 void broadcastWatchEvent(WatchEvent event) { |
| 2111 analysisServer.pluginManager.broadcastWatchEvent(event); |
| 2112 } |
| 2113 |
| 2114 @override |
| 2109 void computingPackageMap(bool computing) => | 2115 void computingPackageMap(bool computing) => |
| 2110 analysisServer._computingPackageMap(computing); | 2116 analysisServer._computingPackageMap(computing); |
| 2111 | 2117 |
| 2112 @override | 2118 @override |
| 2113 ContextBuilder createContextBuilder(Folder folder, AnalysisOptions options) { | 2119 ContextBuilder createContextBuilder(Folder folder, AnalysisOptions options) { |
| 2114 String defaultPackageFilePath = null; | 2120 String defaultPackageFilePath = null; |
| 2115 String defaultPackagesDirectoryPath = null; | 2121 String defaultPackagesDirectoryPath = null; |
| 2116 String path = (analysisServer.contextManager as ContextManagerImpl) | 2122 String path = (analysisServer.contextManager as ContextManagerImpl) |
| 2117 .normalizedPackageRoots[folder.path]; | 2123 .normalizedPackageRoots[folder.path]; |
| 2118 if (path != null) { | 2124 if (path != null) { |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2348 /** | 2354 /** |
| 2349 * The [PerformanceTag] for time spent in server request handlers. | 2355 * The [PerformanceTag] for time spent in server request handlers. |
| 2350 */ | 2356 */ |
| 2351 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 2357 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 2352 | 2358 |
| 2353 /** | 2359 /** |
| 2354 * The [PerformanceTag] for time spent in split store microtasks. | 2360 * The [PerformanceTag] for time spent in split store microtasks. |
| 2355 */ | 2361 */ |
| 2356 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 2362 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 2357 } | 2363 } |
| OLD | NEW |