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

Side by Side Diff: pkg/analyzer_plugin/test/plugin/completion_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/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/src/dart/analysis/driver.dart'; 9 import 'package:analyzer/src/dart/analysis/driver.dart';
10 import 'package:analyzer_plugin/plugin/completion_mixin.dart'; 10 import 'package:analyzer_plugin/plugin/completion_mixin.dart';
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 class _TestServerPlugin extends MockServerPlugin with CompletionMixin { 79 class _TestServerPlugin extends MockServerPlugin with CompletionMixin {
80 _TestServerPlugin(ResourceProvider resourceProvider) 80 _TestServerPlugin(ResourceProvider resourceProvider)
81 : super(resourceProvider); 81 : super(resourceProvider);
82 82
83 CompletionSuggestion createSuggestion() { 83 CompletionSuggestion createSuggestion() {
84 return new CompletionSuggestion( 84 return new CompletionSuggestion(
85 CompletionSuggestionKind.IDENTIFIER, 1, '', 0, 0, false, false); 85 CompletionSuggestionKind.IDENTIFIER, 1, '', 0, 0, false, false);
86 } 86 }
87 87
88 @override 88 @override
89 List<CompletionContributor> getCompletionContributors( 89 List<CompletionContributor> getCompletionContributors(String path) {
90 AnalysisDriverGeneric driver) {
91 return <CompletionContributor>[ 90 return <CompletionContributor>[
92 new _TestCompletionContributor( 91 new _TestCompletionContributor(
93 <CompletionSuggestion>[createSuggestion(), createSuggestion()]), 92 <CompletionSuggestion>[createSuggestion(), createSuggestion()]),
94 new _TestCompletionContributor( 93 new _TestCompletionContributor(
95 <CompletionSuggestion>[createSuggestion()]), 94 <CompletionSuggestion>[createSuggestion()]),
96 ]; 95 ];
97 } 96 }
98 97
99 @override 98 @override
100 Future<CompletionRequest> getCompletionRequest( 99 Future<CompletionRequest> getCompletionRequest(
101 CompletionGetSuggestionsParams parameters, 100 CompletionGetSuggestionsParams parameters) async {
102 covariant AnalysisDriverGeneric driver) async {
103 AnalysisResult result = new AnalysisResult( 101 AnalysisResult result = new AnalysisResult(
104 null, null, null, null, null, null, null, null, null, null, null); 102 null, null, null, null, null, null, null, null, null, null, null);
105 return new DartCompletionRequestImpl( 103 return new DartCompletionRequestImpl(
106 resourceProvider, parameters.offset, result); 104 resourceProvider, parameters.offset, result);
107 } 105 }
108 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698