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

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

Issue 561863003: Remove contexts from the index. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 AnalysisContext context = analysisServer.folderMap[contextFolder]; 56 AnalysisContext context = analysisServer.folderMap[contextFolder];
57 if (context != null) { 57 if (context != null) {
58 context.applyChanges(changeSet); 58 context.applyChanges(changeSet);
59 analysisServer.schedulePerformAnalysisOperation(context); 59 analysisServer.schedulePerformAnalysisOperation(context);
60 } 60 }
61 } 61 }
62 62
63 @override 63 @override
64 void removeContext(Folder folder) { 64 void removeContext(Folder folder) {
65 AnalysisContext context = analysisServer.folderMap.remove(folder); 65 AnalysisContext context = analysisServer.folderMap.remove(folder);
66 if (analysisServer.index != null) {
67 analysisServer.index.removeContext(context);
68 }
66 analysisServer.sendContextAnalysisDoneNotifications( 69 analysisServer.sendContextAnalysisDoneNotifications(
67 context, 70 context,
68 AnalysisDoneReason.CONTEXT_REMOVED); 71 AnalysisDoneReason.CONTEXT_REMOVED);
69 } 72 }
70 73
71 @override 74 @override
72 void updateContextPackageMap(Folder contextFolder, 75 void updateContextPackageMap(Folder contextFolder,
73 Map<String, List<Folder>> packageMap) { 76 Map<String, List<Folder>> packageMap) {
74 AnalysisContext context = analysisServer.folderMap[contextFolder]; 77 AnalysisContext context = analysisServer.folderMap[contextFolder];
75 context.sourceFactory = _createSourceFactory(packageMap); 78 context.sourceFactory = _createSourceFactory(packageMap);
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 * An object that is listening for lifecycle events from an analysis server. 926 * An object that is listening for lifecycle events from an analysis server.
924 */ 927 */
925 abstract class AnalysisServerListener { 928 abstract class AnalysisServerListener {
926 /** 929 /**
927 * Analysis is complete. 930 * Analysis is complete.
928 */ 931 */
929 void analysisComplete(); 932 void analysisComplete();
930 } 933 }
931 934
932 typedef void OptionUpdater(AnalysisOptionsImpl options); 935 typedef void OptionUpdater(AnalysisOptionsImpl options);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698