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

Side by Side Diff: pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart

Issue 1469393003: remove redundant CompletionRequestImpl class (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/test/services/completion/completion_computer_test.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 test.services.completion.dart.util; 5 library test.services.completion.dart.util;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol 9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol
10 show Element, ElementKind; 10 show Element, ElementKind;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // would therefore not wait for microtask callbacks that are scheduled after 129 // would therefore not wait for microtask callbacks that are scheduled after
130 // invoking this method. 130 // invoking this method.
131 return new Future.delayed( 131 return new Future.delayed(
132 Duration.ZERO, () => computeLibrariesContaining(times - 1)); 132 Duration.ZERO, () => computeLibrariesContaining(times - 1));
133 } 133 }
134 134
135 Future computeSuggestions([int times = 200]) async { 135 Future computeSuggestions([int times = 200]) async {
136 AnalysisServer server = new AnalysisServerMock( 136 AnalysisServer server = new AnalysisServerMock(
137 searchEngine: searchEngine, resourceProvider: provider); 137 searchEngine: searchEngine, resourceProvider: provider);
138 CompletionRequestImpl baseRequest = new CompletionRequestImpl( 138 CompletionRequestImpl baseRequest = new CompletionRequestImpl(
139 server, context, provider, testSource, completionOffset); 139 server, context, testSource, completionOffset);
140 request = new DartCompletionRequestImpl.forRequest(baseRequest); 140 request = new DartCompletionRequestImpl.forRequest(baseRequest);
141 Completer<List<CompletionSuggestion>> completer = 141 Completer<List<CompletionSuggestion>> completer =
142 new Completer<List<CompletionSuggestion>>(); 142 new Completer<List<CompletionSuggestion>>();
143 143
144 // Request completions 144 // Request completions
145 contributor 145 contributor
146 .computeSuggestions(request) 146 .computeSuggestions(request)
147 .then((List<CompletionSuggestion> computedSuggestions) { 147 .then((List<CompletionSuggestion> computedSuggestions) {
148 completer.complete(computedSuggestions); 148 completer.complete(computedSuggestions);
149 }); 149 });
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 214
215 @override 215 @override
216 void setUp() { 216 void setUp() {
217 super.setUp(); 217 super.setUp();
218 index = createLocalMemoryIndex(); 218 index = createLocalMemoryIndex();
219 searchEngine = new SearchEngineImpl(index); 219 searchEngine = new SearchEngineImpl(index);
220 contributor = createContributor(); 220 contributor = createContributor();
221 } 221 }
222 } 222 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/completion_computer_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698