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

Side by Side Diff: pkg/analysis_server/lib/plugin/edit/fix/fix_dart.dart

Issue 1582613010: Use getResolvedCompilationUnit2() instead of resolveCompilationUnit2() in QuickAssist and QuickFix … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analysis_server.plugin.edit.fix.fix_dart; 5 library analysis_server.plugin.edit.fix.fix_dart;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; 9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
10 import 'package:analysis_server/src/services/correction/fix_internal.dart' 10 import 'package:analysis_server/src/services/correction/fix_internal.dart'
(...skipping 26 matching lines...) Expand all
37 AnalysisContext analysisContext = context.analysisContext; 37 AnalysisContext analysisContext = context.analysisContext;
38 Source source = context.error.source; 38 Source source = context.error.source;
39 if (!AnalysisEngine.isDartFileName(source.fullName)) { 39 if (!AnalysisEngine.isDartFileName(source.fullName)) {
40 return Fix.EMPTY_LIST; 40 return Fix.EMPTY_LIST;
41 } 41 }
42 List<Source> libraries = analysisContext.getLibrariesContaining(source); 42 List<Source> libraries = analysisContext.getLibrariesContaining(source);
43 if (libraries.isEmpty) { 43 if (libraries.isEmpty) {
44 return Fix.EMPTY_LIST; 44 return Fix.EMPTY_LIST;
45 } 45 }
46 CompilationUnit unit = 46 CompilationUnit unit =
47 analysisContext.resolveCompilationUnit2(source, libraries[0]); 47 analysisContext.getResolvedCompilationUnit2(source, libraries[0]);
48 if (unit == null) { 48 if (unit == null) {
49 return Fix.EMPTY_LIST; 49 return Fix.EMPTY_LIST;
50 } 50 }
51 DartFixContext dartContext = new DartFixContextImpl(context, unit); 51 DartFixContext dartContext = new DartFixContextImpl(context, unit);
52 return internalComputeFixes(dartContext); 52 return internalComputeFixes(dartContext);
53 } 53 }
54 54
55 /** 55 /**
56 * Return a list of fixes for the given [context]. 56 * Return a list of fixes for the given [context].
57 */ 57 */
58 Future<List<Fix>> internalComputeFixes(DartFixContext context); 58 Future<List<Fix>> internalComputeFixes(DartFixContext context);
59 } 59 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/plugin/edit/assist/assist_dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698