| 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 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 ServerContextManagerCallbacks(this.analysisServer, this.resourceProvider); | 1857 ServerContextManagerCallbacks(this.analysisServer, this.resourceProvider); |
| 1858 | 1858 |
| 1859 @override | 1859 @override |
| 1860 nd.AnalysisDriver addAnalysisDriver(Folder folder, AnalysisOptions options) { | 1860 nd.AnalysisDriver addAnalysisDriver(Folder folder, AnalysisOptions options) { |
| 1861 ContextBuilder builder = createContextBuilder(folder, options); | 1861 ContextBuilder builder = createContextBuilder(folder, options); |
| 1862 nd.AnalysisDriver analysisDriver = builder.buildDriver(folder.path); | 1862 nd.AnalysisDriver analysisDriver = builder.buildDriver(folder.path); |
| 1863 analysisDriver.results.listen((result) { | 1863 analysisDriver.results.listen((result) { |
| 1864 NotificationManager notificationManager = | 1864 NotificationManager notificationManager = |
| 1865 analysisServer.notificationManager; | 1865 analysisServer.notificationManager; |
| 1866 String path = result.path; | 1866 String path = result.path; |
| 1867 if (notificationManager != null) { | 1867 if (analysisServer.shouldSendErrorsNotificationFor(path)) { |
| 1868 notificationManager.recordAnalysisErrors( | 1868 if (notificationManager != null) { |
| 1869 NotificationManager.serverId, | 1869 notificationManager.recordAnalysisErrors( |
| 1870 path, | 1870 NotificationManager.serverId, |
| 1871 server.doAnalysisError_listFromEngine( | 1871 path, |
| 1872 result.driver.analysisOptions, result.lineInfo, result.errors)); | 1872 server.doAnalysisError_listFromEngine( |
| 1873 } else { | 1873 result.driver.analysisOptions, |
| 1874 new_sendErrorNotification(analysisServer, result); | 1874 result.lineInfo, |
| 1875 result.errors)); |
| 1876 } else { |
| 1877 new_sendErrorNotification(analysisServer, result); |
| 1878 } |
| 1875 } | 1879 } |
| 1876 CompilationUnit unit = result.unit; | 1880 CompilationUnit unit = result.unit; |
| 1877 if (unit != null) { | 1881 if (unit != null) { |
| 1878 if (notificationManager != null) { | 1882 if (notificationManager != null) { |
| 1879 if (analysisServer._hasAnalysisServiceSubscription( | 1883 if (analysisServer._hasAnalysisServiceSubscription( |
| 1880 AnalysisService.HIGHLIGHTS, path)) { | 1884 AnalysisService.HIGHLIGHTS, path)) { |
| 1881 _runDelayed(() { | 1885 _runDelayed(() { |
| 1882 notificationManager.recordHighlightRegions( | 1886 notificationManager.recordHighlightRegions( |
| 1883 NotificationManager.serverId, | 1887 NotificationManager.serverId, |
| 1884 path, | 1888 path, |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2255 /** | 2259 /** |
| 2256 * The [PerformanceTag] for time spent in server request handlers. | 2260 * The [PerformanceTag] for time spent in server request handlers. |
| 2257 */ | 2261 */ |
| 2258 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 2262 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 2259 | 2263 |
| 2260 /** | 2264 /** |
| 2261 * The [PerformanceTag] for time spent in split store microtasks. | 2265 * The [PerformanceTag] for time spent in split store microtasks. |
| 2262 */ | 2266 */ |
| 2263 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 2267 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 2264 } | 2268 } |
| OLD | NEW |