Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 332383006: Trigger re-analysis when a file changes on disk. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698