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:io' as io; | 10 import 'dart:io' as io; |
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 InternalAnalysisContext context = | 1597 InternalAnalysisContext context = |
1598 AnalysisEngine.instance.createAnalysisContext(); | 1598 AnalysisEngine.instance.createAnalysisContext(); |
1599 context.contentCache = analysisServer.overlayState; | 1599 context.contentCache = analysisServer.overlayState; |
1600 analysisServer.folderMap[folder] = context; | 1600 analysisServer.folderMap[folder] = context; |
1601 context.fileResolverProvider = analysisServer.fileResolverProvider; | 1601 context.fileResolverProvider = analysisServer.fileResolverProvider; |
1602 context.sourceFactory = | 1602 context.sourceFactory = |
1603 _createSourceFactory(context, options, disposition, folder); | 1603 _createSourceFactory(context, options, disposition, folder); |
1604 context.analysisOptions = options; | 1604 context.analysisOptions = options; |
1605 | 1605 |
1606 // TODO(scheglov) use linked bundles | 1606 // TODO(scheglov) use linked bundles |
1607 analysisServer.pubSummaryManager.getLinkedBundles(context); | 1607 // analysisServer.pubSummaryManager.getLinkedBundles(context); |
1608 | 1608 |
1609 analysisServer._onContextsChangedController | 1609 analysisServer._onContextsChangedController |
1610 .add(new ContextsChangedEvent(added: [context])); | 1610 .add(new ContextsChangedEvent(added: [context])); |
1611 analysisServer.schedulePerformAnalysisOperation(context); | 1611 analysisServer.schedulePerformAnalysisOperation(context); |
1612 | 1612 |
1613 return context; | 1613 return context; |
1614 } | 1614 } |
1615 | 1615 |
1616 @override | 1616 @override |
1617 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) { | 1617 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) { |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 /** | 1803 /** |
1804 * The [PerformanceTag] for time spent in server request handlers. | 1804 * The [PerformanceTag] for time spent in server request handlers. |
1805 */ | 1805 */ |
1806 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 1806 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
1807 | 1807 |
1808 /** | 1808 /** |
1809 * The [PerformanceTag] for time spent in split store microtasks. | 1809 * The [PerformanceTag] for time spent in split store microtasks. |
1810 */ | 1810 */ |
1811 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1811 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
1812 } | 1812 } |
OLD | NEW |