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

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

Issue 553193002: Implement "analysis.reanalyze" in analysis server. (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
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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 if (!operationQueue.isEmpty) { 467 if (!operationQueue.isEmpty) {
468 _schedulePerformOperation(); 468 _schedulePerformOperation();
469 } else { 469 } else {
470 sendStatusNotification(null); 470 sendStatusNotification(null);
471 _notifyAnalysisComplete(); 471 _notifyAnalysisComplete();
472 } 472 }
473 } 473 }
474 } 474 }
475 475
476 /** 476 /**
477 * Trigger reanalysis of all files from disk.
478 */
479 void reanalyze() {
480 // Clear any operations that are pending.
481 operationQueue.clear();
482 // Instruct the contextDirectoryManager to rebuild all contexts from
483 // scratch.
484 contextDirectoryManager.refresh();
485 }
486
487 /**
477 * Remove the given [listener] from the list of listeners that are listening 488 * Remove the given [listener] from the list of listeners that are listening
478 * for lifecycle events from this server. 489 * for lifecycle events from this server.
479 */ 490 */
480 void removeAnalysisServerListener(AnalysisServerListener listener) { 491 void removeAnalysisServerListener(AnalysisServerListener listener) {
481 listeners.remove(listener); 492 listeners.remove(listener);
482 } 493 }
483 494
484 /** 495 /**
485 * Send status notification to the client. The `operation` is the operation 496 * Send status notification to the client. The `operation` is the operation
486 * being performed or `null` if analysis is complete. 497 * being performed or `null` if analysis is complete.
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 * An object that is listening for lifecycle events from an analysis server. 923 * An object that is listening for lifecycle events from an analysis server.
913 */ 924 */
914 abstract class AnalysisServerListener { 925 abstract class AnalysisServerListener {
915 /** 926 /**
916 * Analysis is complete. 927 * Analysis is complete.
917 */ 928 */
918 void analysisComplete(); 929 void analysisComplete();
919 } 930 }
920 931
921 typedef void OptionUpdater(AnalysisOptionsImpl options); 932 typedef void OptionUpdater(AnalysisOptionsImpl options);
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/constants.dart » ('j') | pkg/analysis_server/lib/src/context_manager.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698