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

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

Issue 418203002: Implement more fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments Created 6 years, 5 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/edit/fix_test.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 edit.domain; 5 library edit.domain;
6 6
7 import 'package:analysis_server/src/analysis_server.dart'; 7 import 'package:analysis_server/src/analysis_server.dart';
8 import 'package:analysis_server/src/constants.dart'; 8 import 'package:analysis_server/src/constants.dart';
9 import 'package:analysis_server/src/protocol.dart'; 9 import 'package:analysis_server/src/protocol.dart';
10 import 'package:analysis_services/constants.dart'; 10 import 'package:analysis_services/constants.dart';
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 Response getFixes(Request request) { 89 Response getFixes(Request request) {
90 String file = request.getRequiredParameter(FILE).asString(); 90 String file = request.getRequiredParameter(FILE).asString();
91 int offset = request.getRequiredParameter(OFFSET).asInt(); 91 int offset = request.getRequiredParameter(OFFSET).asInt();
92 List<ErrorFixes> errorFixesList = <ErrorFixes>[]; 92 List<ErrorFixes> errorFixesList = <ErrorFixes>[];
93 List<CompilationUnit> units = server.getResolvedCompilationUnits(file); 93 List<CompilationUnit> units = server.getResolvedCompilationUnits(file);
94 for (CompilationUnit unit in units) { 94 for (CompilationUnit unit in units) {
95 engine.AnalysisErrorInfo errorInfo = server.getErrors(file); 95 engine.AnalysisErrorInfo errorInfo = server.getErrors(file);
96 if (errorInfo != null) { 96 if (errorInfo != null) {
97 for (engine.AnalysisError error in errorInfo.errors) { 97 for (engine.AnalysisError error in errorInfo.errors) {
98 List<Fix> fixes = computeFixes(searchEngine, file, unit, error); 98 List<Fix> fixes = computeFixes(searchEngine, unit, error);
99 if (fixes.isNotEmpty) { 99 if (fixes.isNotEmpty) {
100 AnalysisError serverError = 100 AnalysisError serverError =
101 new AnalysisError.fromEngine(errorInfo.lineInfo, error); 101 new AnalysisError.fromEngine(errorInfo.lineInfo, error);
102 ErrorFixes errorFixes = new ErrorFixes(serverError); 102 ErrorFixes errorFixes = new ErrorFixes(serverError);
103 errorFixesList.add(errorFixes); 103 errorFixesList.add(errorFixes);
104 fixes.forEach((fix) { 104 fixes.forEach((fix) {
105 return errorFixes.addFix(fix); 105 return errorFixes.addFix(fix);
106 }); 106 });
107 } 107 }
108 } 108 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 Response setRefactoringOptions(Request request) { 154 Response setRefactoringOptions(Request request) {
155 // id 155 // id
156 RequestDatum idDatum = request.getRequiredParameter(ID); 156 RequestDatum idDatum = request.getRequiredParameter(ID);
157 String id = idDatum.asString(); 157 String id = idDatum.asString();
158 // TODO(brianwilkerson) implement 158 // TODO(brianwilkerson) implement
159 return null; 159 return null;
160 } 160 }
161 } 161 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/edit/fix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698