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

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

Issue 576473003: Split refactoring problems into init, options and final. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/generated_protocol.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/edit/edit_domain.dart
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index a576772742669b11ee62fba573df5dc971e1e109..efb8936cf3caa0fd3f145d9ddb16418b9c268e8d 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -159,6 +159,10 @@ class EditDomainHandler implements RequestHandler {
* is invalidated and a new one is created and initialized.
*/
class _RefactoringManager {
+ static const List<RefactoringProblem> EMPTY_PROBLEM_LIST = const
+ <RefactoringProblem>[
+ ];
+
final AnalysisServer server;
final SearchEngine searchEngine;
@@ -198,7 +202,10 @@ class _RefactoringManager {
void getRefactoring(Request request) {
// prepare for processing the request
requestId = request.id;
- result = new EditGetRefactoringResult(<RefactoringProblem>[]);
+ result = new EditGetRefactoringResult(
+ EMPTY_PROBLEM_LIST,
+ EMPTY_PROBLEM_LIST,
+ EMPTY_PROBLEM_LIST);
// process the request
var params = new EditGetRefactoringParams.fromRequest(request);
_init(params.kind, params.file, params.offset, params.length).then((_) {
@@ -361,13 +368,9 @@ class _RefactoringManager {
result.feedback = feedback;
}
// set problems
- {
- RefactoringStatus status = new RefactoringStatus();
- status.addStatus(initStatus);
- status.addStatus(optionsStatus);
- status.addStatus(finalStatus);
- result.problems = status.problems;
- }
+ result.initialProblems = initStatus.problems;
+ result.optionsProblems = optionsStatus.problems;
+ result.finalProblems = finalStatus.problems;
// send the response
server.sendResponse(result.toResponse(requestId));
// done with this request
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/generated_protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698