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

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

Issue 2953093002: Update the plugin API (Closed)
Patch Set: Update FixesRequest 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/dart/analysis/results.dart' hide AnalysisResult;
8 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
9 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
10 import 'package:analyzer/src/dart/analysis/driver.dart'; 9 import 'package:analyzer/src/dart/analysis/driver.dart';
11 import 'package:analyzer_plugin/plugin/assist_mixin.dart'; 10 import 'package:analyzer_plugin/plugin/assist_mixin.dart';
12 import 'package:analyzer_plugin/protocol/protocol_common.dart'; 11 import 'package:analyzer_plugin/protocol/protocol_common.dart';
13 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; 12 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
13 import 'package:analyzer_plugin/src/utilities/assist/assist.dart';
14 import 'package:analyzer_plugin/utilities/assist/assist.dart'; 14 import 'package:analyzer_plugin/utilities/assist/assist.dart';
15 import 'package:path/src/context.dart'; 15 import 'package:path/src/context.dart';
16 import 'package:test/test.dart'; 16 import 'package:test/test.dart';
17 import 'package:test_reflective_loader/test_reflective_loader.dart'; 17 import 'package:test_reflective_loader/test_reflective_loader.dart';
18 18
19 import 'mocks.dart'; 19 import 'mocks.dart';
20 20
21 void main() { 21 void main() {
22 defineReflectiveTests(AssistsMixinTest); 22 defineReflectiveTests(AssistsMixinTest);
23 } 23 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 @override 81 @override
82 List<AssistContributor> getAssistContributors(AnalysisDriverGeneric driver) { 82 List<AssistContributor> getAssistContributors(AnalysisDriverGeneric driver) {
83 return <AssistContributor>[ 83 return <AssistContributor>[
84 new _TestAssistContributor(<PrioritizedSourceChange>[createChange()]), 84 new _TestAssistContributor(<PrioritizedSourceChange>[createChange()]),
85 new _TestAssistContributor( 85 new _TestAssistContributor(
86 <PrioritizedSourceChange>[createChange(), createChange()]) 86 <PrioritizedSourceChange>[createChange(), createChange()])
87 ]; 87 ];
88 } 88 }
89 89
90 @override 90 @override
91 Future<ResolveResult> getResolveResultForAssists( 91 Future<AssistRequest> getAssistRequest(
92 AnalysisDriverGeneric driver, String path) async { 92 EditGetAssistsParams parameters, covariant AnalysisDriver driver) async {
93 return new AnalysisResult( 93 AnalysisResult result = new AnalysisResult(
94 null, null, null, null, null, null, null, null, null, null, null); 94 null, null, null, null, null, null, null, null, null, null, null);
95 return new DartAssistRequestImpl(
96 resourceProvider, parameters.offset, parameters.length, result);
95 } 97 }
96 } 98 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698