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

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

Issue 1517723002: Server custom error severity support (#24452). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: lib_renames Created 5 years 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | 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 domain.analysis; 5 library domain.analysis;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:core' hide Resource; 8 import 'dart:core' hide Resource;
9 9
10 import 'package:analysis_server/plugin/analysis/analysis_domain.dart'; 10 import 'package:analysis_server/plugin/analysis/analysis_domain.dart';
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 return new Response.getErrorsInvalidFile(request); 58 return new Response.getErrorsInvalidFile(request);
59 } 59 }
60 completionFuture.then((AnalysisDoneReason reason) { 60 completionFuture.then((AnalysisDoneReason reason) {
61 switch (reason) { 61 switch (reason) {
62 case AnalysisDoneReason.COMPLETE: 62 case AnalysisDoneReason.COMPLETE:
63 engine.AnalysisErrorInfo errorInfo = server.getErrors(file); 63 engine.AnalysisErrorInfo errorInfo = server.getErrors(file);
64 List<AnalysisError> errors; 64 List<AnalysisError> errors;
65 if (errorInfo == null) { 65 if (errorInfo == null) {
66 server.sendResponse(new Response.getErrorsInvalidFile(request)); 66 server.sendResponse(new Response.getErrorsInvalidFile(request));
67 } else { 67 } else {
68 errors = doAnalysisError_listFromEngine( 68 engine.AnalysisContext context = server.getAnalysisContext(file);
69 errors = doAnalysisError_listFromEngine(context,
69 errorInfo.lineInfo, errorInfo.errors); 70 errorInfo.lineInfo, errorInfo.errors);
70 server.sendResponse( 71 server.sendResponse(
71 new AnalysisGetErrorsResult(errors).toResponse(request.id)); 72 new AnalysisGetErrorsResult(errors).toResponse(request.id));
72 } 73 }
73 break; 74 break;
74 case AnalysisDoneReason.CONTEXT_REMOVED: 75 case AnalysisDoneReason.CONTEXT_REMOVED:
75 // The active contexts have changed, so try again. 76 // The active contexts have changed, so try again.
76 Response response = getErrors(request); 77 Response response = getErrors(request);
77 if (response != Response.DELAYED_RESPONSE) { 78 if (response != Response.DELAYED_RESPONSE) {
78 server.sendResponse(response); 79 server.sendResponse(response);
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 context.onResultComputed(descriptor).listen((result) { 401 context.onResultComputed(descriptor).listen((result) {
401 StreamController<engine.ComputedResult> controller = 402 StreamController<engine.ComputedResult> controller =
402 controllers[result.descriptor]; 403 controllers[result.descriptor];
403 if (controller != null) { 404 if (controller != null) {
404 controller.add(result); 405 controller.add(result);
405 } 406 }
406 }); 407 });
407 } 408 }
408 } 409 }
409 } 410 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698