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

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

Issue 1448173002: Add ApplyChangesStatus to AnalysisContext.applyChanges() and use it in DAS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 import 'dart:core' hide Resource; 9 import 'dart:core' hide Resource;
10 import 'dart:math' show max; 10 import 'dart:math' show max;
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 analysisServer._onContextsChangedController 1458 analysisServer._onContextsChangedController
1459 .add(new ContextsChangedEvent(added: [context])); 1459 .add(new ContextsChangedEvent(added: [context]));
1460 analysisServer.schedulePerformAnalysisOperation(context); 1460 analysisServer.schedulePerformAnalysisOperation(context);
1461 return context; 1461 return context;
1462 } 1462 }
1463 1463
1464 @override 1464 @override
1465 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) { 1465 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) {
1466 AnalysisContext context = analysisServer.folderMap[contextFolder]; 1466 AnalysisContext context = analysisServer.folderMap[contextFolder];
1467 if (context != null) { 1467 if (context != null) {
1468 context.applyChanges(changeSet); 1468 ApplyChangesStatus changesStatus = context.applyChanges(changeSet);
1469 analysisServer.schedulePerformAnalysisOperation(context); 1469 if (changesStatus.hasChanges) {
1470 analysisServer.schedulePerformAnalysisOperation(context);
1471 }
1470 List<String> flushedFiles = new List<String>(); 1472 List<String> flushedFiles = new List<String>();
1471 for (Source source in changeSet.removedSources) { 1473 for (Source source in changeSet.removedSources) {
1472 flushedFiles.add(source.fullName); 1474 flushedFiles.add(source.fullName);
1473 } 1475 }
1474 sendAnalysisNotificationFlushResults(analysisServer, flushedFiles); 1476 sendAnalysisNotificationFlushResults(analysisServer, flushedFiles);
1475 } 1477 }
1476 } 1478 }
1477 1479
1478 @override 1480 @override
1479 void beginComputePackageMap() { 1481 void beginComputePackageMap() {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 /** 1646 /**
1645 * The [PerformanceTag] for time spent in server request handlers. 1647 * The [PerformanceTag] for time spent in server request handlers.
1646 */ 1648 */
1647 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 1649 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
1648 1650
1649 /** 1651 /**
1650 * The [PerformanceTag] for time spent in split store microtasks. 1652 * The [PerformanceTag] for time spent in split store microtasks.
1651 */ 1653 */
1652 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1654 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1653 } 1655 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis_server_test.dart » ('j') | pkg/analyzer/lib/src/context/context.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698