| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import 'dart:core'; | 7 import 'dart:core'; |
| 8 import 'dart:io' as io; | 8 import 'dart:io' as io; |
| 9 import 'dart:math' show max; | 9 import 'dart:math' show max; |
| 10 | 10 |
| (...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1952 * The [ResourceProvider] by which paths are converted into [Resource]s. | 1952 * The [ResourceProvider] by which paths are converted into [Resource]s. |
| 1953 */ | 1953 */ |
| 1954 final ResourceProvider resourceProvider; | 1954 final ResourceProvider resourceProvider; |
| 1955 | 1955 |
| 1956 ServerContextManagerCallbacks(this.analysisServer, this.resourceProvider); | 1956 ServerContextManagerCallbacks(this.analysisServer, this.resourceProvider); |
| 1957 | 1957 |
| 1958 @override | 1958 @override |
| 1959 nd.AnalysisDriver addAnalysisDriver( | 1959 nd.AnalysisDriver addAnalysisDriver( |
| 1960 Folder folder, ContextRoot contextRoot, AnalysisOptions options) { | 1960 Folder folder, ContextRoot contextRoot, AnalysisOptions options) { |
| 1961 ContextBuilder builder = createContextBuilder(folder, options); | 1961 ContextBuilder builder = createContextBuilder(folder, options); |
| 1962 nd.AnalysisDriver analysisDriver = builder.buildDriver(contextRoot); | 1962 nd.AnalysisDriver analysisDriver = |
| 1963 builder.buildDriver(contextRoot, verbosePrint: print); |
| 1963 analysisDriver.results.listen((result) { | 1964 analysisDriver.results.listen((result) { |
| 1964 NotificationManager notificationManager = | 1965 NotificationManager notificationManager = |
| 1965 analysisServer.notificationManager; | 1966 analysisServer.notificationManager; |
| 1966 String path = result.path; | 1967 String path = result.path; |
| 1967 if (analysisServer.shouldSendErrorsNotificationFor(path)) { | 1968 if (analysisServer.shouldSendErrorsNotificationFor(path)) { |
| 1968 if (notificationManager != null) { | 1969 if (notificationManager != null) { |
| 1969 notificationManager.recordAnalysisErrors( | 1970 notificationManager.recordAnalysisErrors( |
| 1970 NotificationManager.serverId, | 1971 NotificationManager.serverId, |
| 1971 path, | 1972 path, |
| 1972 server.doAnalysisError_listFromEngine( | 1973 server.doAnalysisError_listFromEngine( |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2063 } | 2064 } |
| 2064 AnalysisEngine.instance.logger.logError(message, result.exception); | 2065 AnalysisEngine.instance.logger.logError(message, result.exception); |
| 2065 }); | 2066 }); |
| 2066 analysisServer.driverMap[folder] = analysisDriver; | 2067 analysisServer.driverMap[folder] = analysisDriver; |
| 2067 return analysisDriver; | 2068 return analysisDriver; |
| 2068 } | 2069 } |
| 2069 | 2070 |
| 2070 @override | 2071 @override |
| 2071 AnalysisContext addContext(Folder folder, AnalysisOptions options) { | 2072 AnalysisContext addContext(Folder folder, AnalysisOptions options) { |
| 2072 ContextBuilder builder = createContextBuilder(folder, options); | 2073 ContextBuilder builder = createContextBuilder(folder, options); |
| 2073 AnalysisContext context = builder.buildContext(folder.path); | 2074 AnalysisContext context = |
| 2075 builder.buildContext(folder.path, verbosePrint: print); |
| 2074 | 2076 |
| 2075 analysisServer.folderMap[folder] = context; | 2077 analysisServer.folderMap[folder] = context; |
| 2076 analysisServer._onContextsChangedController | 2078 analysisServer._onContextsChangedController |
| 2077 .add(new ContextsChangedEvent(added: [context])); | 2079 .add(new ContextsChangedEvent(added: [context])); |
| 2078 analysisServer.schedulePerformAnalysisOperation(context); | 2080 analysisServer.schedulePerformAnalysisOperation(context); |
| 2079 | 2081 |
| 2080 return context; | 2082 return context; |
| 2081 } | 2083 } |
| 2082 | 2084 |
| 2083 @override | 2085 @override |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2368 /** | 2370 /** |
| 2369 * The [PerformanceTag] for time spent in server request handlers. | 2371 * The [PerformanceTag] for time spent in server request handlers. |
| 2370 */ | 2372 */ |
| 2371 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 2373 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 2372 | 2374 |
| 2373 /** | 2375 /** |
| 2374 * The [PerformanceTag] for time spent in split store microtasks. | 2376 * The [PerformanceTag] for time spent in split store microtasks. |
| 2375 */ | 2377 */ |
| 2376 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 2378 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 2377 } | 2379 } |
| OLD | NEW |