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

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

Issue 1253103007: WEB-17598. Name new libraries according to the Dart Style Guide. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
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 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/edit/assist/assist_core.dart'; 9 import 'package:analysis_server/edit/assist/assist_core.dart';
10 import 'package:analysis_server/edit/fix/fix_core.dart'; 10 import 'package:analysis_server/edit/fix/fix_core.dart';
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 List<AnalysisErrorFixes> errorFixesList = <AnalysisErrorFixes>[]; 150 List<AnalysisErrorFixes> errorFixesList = <AnalysisErrorFixes>[];
151 List<CompilationUnit> units = server.getResolvedCompilationUnits(file); 151 List<CompilationUnit> units = server.getResolvedCompilationUnits(file);
152 for (CompilationUnit unit in units) { 152 for (CompilationUnit unit in units) {
153 engine.AnalysisErrorInfo errorInfo = server.getErrors(file); 153 engine.AnalysisErrorInfo errorInfo = server.getErrors(file);
154 if (errorInfo != null) { 154 if (errorInfo != null) {
155 LineInfo lineInfo = errorInfo.lineInfo; 155 LineInfo lineInfo = errorInfo.lineInfo;
156 int requestLine = lineInfo.getLocation(offset).lineNumber; 156 int requestLine = lineInfo.getLocation(offset).lineNumber;
157 for (engine.AnalysisError error in errorInfo.errors) { 157 for (engine.AnalysisError error in errorInfo.errors) {
158 int errorLine = lineInfo.getLocation(error.offset).lineNumber; 158 int errorLine = lineInfo.getLocation(error.offset).lineNumber;
159 if (errorLine == requestLine) { 159 if (errorLine == requestLine) {
160 List<Fix> fixes = 160 List<Fix> fixes = computeFixes(server.serverPlugin,
161 computeFixes(server.serverPlugin, unit.element.context, error); 161 server.resourceProvider, unit.element.context, error);
162 if (fixes.isNotEmpty) { 162 if (fixes.isNotEmpty) {
163 AnalysisError serverError = 163 AnalysisError serverError =
164 newAnalysisError_fromEngine(lineInfo, error); 164 newAnalysisError_fromEngine(lineInfo, error);
165 AnalysisErrorFixes errorFixes = 165 AnalysisErrorFixes errorFixes =
166 new AnalysisErrorFixes(serverError); 166 new AnalysisErrorFixes(serverError);
167 errorFixesList.add(errorFixes); 167 errorFixesList.add(errorFixes);
168 fixes.forEach((fix) { 168 fixes.forEach((fix) {
169 errorFixes.fixes.add(fix.change); 169 errorFixes.fixes.add(fix.change);
170 }); 170 });
171 } 171 }
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 } 685 }
686 if (refactoring is RenameRefactoring) { 686 if (refactoring is RenameRefactoring) {
687 RenameRefactoring renameRefactoring = refactoring; 687 RenameRefactoring renameRefactoring = refactoring;
688 RenameOptions renameOptions = params.options; 688 RenameOptions renameOptions = params.options;
689 renameRefactoring.newName = renameOptions.newName; 689 renameRefactoring.newName = renameOptions.newName;
690 return renameRefactoring.checkNewName(); 690 return renameRefactoring.checkNewName();
691 } 691 }
692 return new RefactoringStatus(); 692 return new RefactoringStatus();
693 } 693 }
694 } 694 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/edit/fix/fix_dart.dart ('k') | pkg/analysis_server/lib/src/services/correction/fix.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698