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

Unified Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 854493002: Have the analysis server not send error notifications when NO_ERROR_NOTIFICATION has been set to tr… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: update flag description Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/server/driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 60d00449adfa109ac09fba82e95fc8e94e7b9625..14d2480e7f5a492332f6b60ee96458f65dec40cb 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -154,6 +154,11 @@ class AnalysisServer {
new HashMap<AnalysisContext, Completer<AnalysisDoneReason>>();
/**
+ * The option possibly set from the server initialization which disables error notifications.
+ */
+ bool _noErrorNotification;
+
+ /**
* The controller that is notified when analysis is started.
*/
StreamController<AnalysisContext> _onAnalysisStartedController;
@@ -201,6 +206,7 @@ class AnalysisServer {
analysisServerOptions.enableIncrementalResolutionApi;
contextDirectoryManager.defaultOptions.incrementalValidation =
analysisServerOptions.enableIncrementalResolutionValidation;
+ _noErrorNotification = analysisServerOptions.noErrorNotification;
AnalysisEngine.instance.logger = new AnalysisLogger();
_onAnalysisStartedController = new StreamController.broadcast();
_onAnalysisCompleteController = new StreamController.broadcast();
@@ -839,8 +845,8 @@ class AnalysisServer {
* absolute path.
*/
bool shouldSendErrorsNotificationFor(String file) {
- // TODO(scheglov) add support for the "--no-error-notification" flag.
- return contextDirectoryManager.isInAnalysisRoot(file);
+ return !_noErrorNotification &&
+ contextDirectoryManager.isInAnalysisRoot(file);
}
void shutdown() {
@@ -941,6 +947,7 @@ class AnalysisServer {
class AnalysisServerOptions {
bool enableIncrementalResolutionApi = false;
bool enableIncrementalResolutionValidation = false;
+ bool noErrorNotification = false;
}
/**
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/server/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698