| 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 | 9 |
| 10 import 'package:analysis_server/src/analysis_logger.dart'; | 10 import 'package:analysis_server/src/analysis_logger.dart'; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 @override | 42 @override |
| 43 void addContext(Folder folder, File pubspecFile) { | 43 void addContext(Folder folder, File pubspecFile) { |
| 44 ContextDirectory contextDirectory = new ContextDirectory( | 44 ContextDirectory contextDirectory = new ContextDirectory( |
| 45 analysisServer.defaultSdk, folder, pubspecFile); | 45 analysisServer.defaultSdk, folder, pubspecFile); |
| 46 analysisServer.folderMap[folder] = contextDirectory; | 46 analysisServer.folderMap[folder] = contextDirectory; |
| 47 analysisServer.schedulePerformAnalysisOperation(contextDirectory.context); | 47 analysisServer.schedulePerformAnalysisOperation(contextDirectory.context); |
| 48 } | 48 } |
| 49 | 49 |
| 50 @override | 50 @override |
| 51 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) { | 51 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) { |
| 52 analysisServer.folderMap[contextFolder].context.applyChanges(changeSet); | 52 AnalysisContext context = analysisServer.folderMap[contextFolder].context; |
| 53 context.applyChanges(changeSet); |
| 54 analysisServer.schedulePerformAnalysisOperation(context); |
| 53 } | 55 } |
| 54 | 56 |
| 55 @override | 57 @override |
| 56 void removeContext(Folder folder) { | 58 void removeContext(Folder folder) { |
| 57 analysisServer.folderMap.remove(folder); | 59 analysisServer.folderMap.remove(folder); |
| 58 } | 60 } |
| 59 } | 61 } |
| 60 | 62 |
| 61 /** | 63 /** |
| 62 * Instances of the class [AnalysisServer] implement a server that listens on a | 64 * Instances of the class [AnalysisServer] implement a server that listens on a |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 /** | 491 /** |
| 490 * An enumeration of the services provided by the server domain. | 492 * An enumeration of the services provided by the server domain. |
| 491 */ | 493 */ |
| 492 class ServerService extends Enum2<ServerService> { | 494 class ServerService extends Enum2<ServerService> { |
| 493 static const ServerService STATUS = const ServerService('STATUS', 0); | 495 static const ServerService STATUS = const ServerService('STATUS', 0); |
| 494 | 496 |
| 495 static const List<ServerService> VALUES = const [STATUS]; | 497 static const List<ServerService> VALUES = const [STATUS]; |
| 496 | 498 |
| 497 const ServerService(String name, int ordinal) : super(name, ordinal); | 499 const ServerService(String name, int ordinal) : super(name, ordinal); |
| 498 } | 500 } |
| OLD | NEW |