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

Side by Side Diff: pkg/analyzer_plugin/test/plugin/fix_mixin_test.dart

Issue 2970203002: Remove references to AnalysisDriver from the plugin mixin classes (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analyzer/error/error.dart'; 7 import 'package:analyzer/error/error.dart';
8 import 'package:analyzer/file_system/file_system.dart'; 8 import 'package:analyzer/file_system/file_system.dart';
9 import 'package:analyzer/file_system/memory_file_system.dart'; 9 import 'package:analyzer/file_system/memory_file_system.dart';
10 import 'package:analyzer/src/dart/analysis/driver.dart'; 10 import 'package:analyzer/src/dart/analysis/driver.dart';
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 class _TestServerPlugin extends MockServerPlugin with FixesMixin { 79 class _TestServerPlugin extends MockServerPlugin with FixesMixin {
80 _TestServerPlugin(ResourceProvider resourceProvider) 80 _TestServerPlugin(ResourceProvider resourceProvider)
81 : super(resourceProvider); 81 : super(resourceProvider);
82 82
83 PrioritizedSourceChange createChange() { 83 PrioritizedSourceChange createChange() {
84 return new PrioritizedSourceChange(0, new SourceChange('')); 84 return new PrioritizedSourceChange(0, new SourceChange(''));
85 } 85 }
86 86
87 @override 87 @override
88 List<FixContributor> getFixContributors(AnalysisDriverGeneric driver) { 88 List<FixContributor> getFixContributors(String path) {
89 return <FixContributor>[ 89 return <FixContributor>[
90 new _TestFixContributor(<PrioritizedSourceChange>[createChange()]), 90 new _TestFixContributor(<PrioritizedSourceChange>[createChange()]),
91 new _TestFixContributor( 91 new _TestFixContributor(
92 <PrioritizedSourceChange>[createChange(), createChange()]) 92 <PrioritizedSourceChange>[createChange(), createChange()])
93 ]; 93 ];
94 } 94 }
95 95
96 @override 96 @override
97 Future<FixesRequest> getFixesRequest(EditGetFixesParams parameters, 97 Future<FixesRequest> getFixesRequest(EditGetFixesParams parameters) async {
98 covariant AnalysisDriverGeneric driver) async {
99 int offset = parameters.offset; 98 int offset = parameters.offset;
100 AnalysisError error = new AnalysisError( 99 AnalysisError error = new AnalysisError(
101 new MockSource(), 0, 0, CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT); 100 new MockSource(), 0, 0, CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT);
102 AnalysisResult result = new AnalysisResult(null, null, null, null, null, 101 AnalysisResult result = new AnalysisResult(null, null, null, null, null,
103 null, new LineInfo([0, 20]), null, null, [error], null); 102 null, new LineInfo([0, 20]), null, null, [error], null);
104 return new DartFixesRequestImpl(resourceProvider, offset, [error], result); 103 return new DartFixesRequestImpl(resourceProvider, offset, [error], result);
105 } 104 }
106 } 105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698