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

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

Issue 2953093002: Update the plugin API (Closed)
Patch Set: Update FixesRequest Created 3 years, 6 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 import 'dart:collection';
6 7
7 import 'package:analyzer/file_system/file_system.dart'; 8 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/src/dart/analysis/driver.dart'; 9 import 'package:analyzer/src/dart/analysis/driver.dart';
10 import 'package:analyzer/src/generated/engine.dart';
9 import 'package:analyzer/src/generated/source.dart'; 11 import 'package:analyzer/src/generated/source.dart';
10 import 'package:analyzer_plugin/channel/channel.dart'; 12 import 'package:analyzer_plugin/channel/channel.dart';
11 import 'package:analyzer_plugin/plugin/plugin.dart'; 13 import 'package:analyzer_plugin/plugin/plugin.dart';
12 import 'package:analyzer_plugin/protocol/protocol.dart'; 14 import 'package:analyzer_plugin/protocol/protocol.dart';
13 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; 15 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
14 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart'; 16 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart';
15 import 'package:front_end/src/base/timestamped_data.dart'; 17 import 'package:front_end/src/base/timestamped_data.dart';
16 import 'package:test/test.dart'; 18 import 'package:test/test.dart';
17 19
18 class MockAnalysisDriver extends AnalysisDriverGeneric { 20 class MockAnalysisDriver extends AnalysisDriver {
19 /** 21 @override
20 * The files that have been added to this driver. 22 Set<String> addedFiles = new HashSet<String>();
21 */ 23
22 List<String> addedFiles = <String>[]; 24 MockAnalysisDriver()
25 : super(new AnalysisDriverScheduler(null), null, null, null, null, null,
26 new SourceFactory([]), new AnalysisOptionsImpl());
23 27
24 @override 28 @override
25 bool get hasFilesToAnalyze => false; 29 bool get hasFilesToAnalyze => false;
26 30
27 @override 31 @override
28 set priorityFiles(List<String> priorityPaths) {} 32 set priorityFiles(List<String> priorityPaths) {}
29 33
30 @override 34 @override
31 AnalysisDriverPriority get workPriority => AnalysisDriverPriority.nothing; 35 AnalysisDriverPriority get workPriority => AnalysisDriverPriority.nothing;
32 36
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 157
154 @override 158 @override
155 Uri get uri => Uri.parse('package:test/test.dart'); 159 Uri get uri => Uri.parse('package:test/test.dart');
156 160
157 @override 161 @override
158 UriKind get uriKind => UriKind.PACKAGE_URI; 162 UriKind get uriKind => UriKind.PACKAGE_URI;
159 163
160 @override 164 @override
161 bool exists() => true; 165 bool exists() => true;
162 } 166 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/test/plugin/fix_mixin_test.dart ('k') | pkg/analyzer_plugin/test/plugin/navigation_mixin_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698