| 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 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1624 .add(new ContextsChangedEvent(added: [context])); | 1624 .add(new ContextsChangedEvent(added: [context])); |
| 1625 analysisServer.schedulePerformAnalysisOperation(context); | 1625 analysisServer.schedulePerformAnalysisOperation(context); |
| 1626 | 1626 |
| 1627 return context; | 1627 return context; |
| 1628 } | 1628 } |
| 1629 | 1629 |
| 1630 @override | 1630 @override |
| 1631 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) { | 1631 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) { |
| 1632 AnalysisContext context = analysisServer.folderMap[contextFolder]; | 1632 AnalysisContext context = analysisServer.folderMap[contextFolder]; |
| 1633 if (context != null) { | 1633 if (context != null) { |
| 1634 ApplyChangesStatus changesStatus = context.applyChanges(changeSet); | 1634 context.applyChanges(changeSet); |
| 1635 if (changesStatus.hasChanges) { | 1635 analysisServer.schedulePerformAnalysisOperation(context); |
| 1636 analysisServer.schedulePerformAnalysisOperation(context); | |
| 1637 } | |
| 1638 List<String> flushedFiles = new List<String>(); | 1636 List<String> flushedFiles = new List<String>(); |
| 1639 for (Source source in changeSet.removedSources) { | 1637 for (Source source in changeSet.removedSources) { |
| 1640 flushedFiles.add(source.fullName); | 1638 flushedFiles.add(source.fullName); |
| 1641 } | 1639 } |
| 1642 sendAnalysisNotificationFlushResults(analysisServer, flushedFiles); | 1640 sendAnalysisNotificationFlushResults(analysisServer, flushedFiles); |
| 1643 } | 1641 } |
| 1644 } | 1642 } |
| 1645 | 1643 |
| 1646 @override | 1644 @override |
| 1647 void computingPackageMap(bool computing) => | 1645 void computingPackageMap(bool computing) => |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1796 /** | 1794 /** |
| 1797 * The [PerformanceTag] for time spent in server request handlers. | 1795 * The [PerformanceTag] for time spent in server request handlers. |
| 1798 */ | 1796 */ |
| 1799 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 1797 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 1800 | 1798 |
| 1801 /** | 1799 /** |
| 1802 * The [PerformanceTag] for time spent in split store microtasks. | 1800 * The [PerformanceTag] for time spent in split store microtasks. |
| 1803 */ | 1801 */ |
| 1804 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1802 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 1805 } | 1803 } |
| OLD | NEW |