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

Side by Side Diff: pkg/analysis_server/lib/src/domain_analysis.dart

Issue 1232393005: Add notification of analyzed files (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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) 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 domain.analysis; 5 library domain.analysis;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:core' hide Resource; 8 import 'dart:core' hide Resource;
9 9
10 import 'package:analysis_server/src/analysis_server.dart'; 10 import 'package:analysis_server/src/analysis_server.dart';
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } else if (requestName == ANALYSIS_GET_HOVER) { 161 } else if (requestName == ANALYSIS_GET_HOVER) {
162 return getHover(request); 162 return getHover(request);
163 } else if (requestName == ANALYSIS_GET_LIBRARY_DEPENDENCIES) { 163 } else if (requestName == ANALYSIS_GET_LIBRARY_DEPENDENCIES) {
164 return getLibraryDependencies(request); 164 return getLibraryDependencies(request);
165 } else if (requestName == ANALYSIS_GET_NAVIGATION) { 165 } else if (requestName == ANALYSIS_GET_NAVIGATION) {
166 return getNavigation(request); 166 return getNavigation(request);
167 } else if (requestName == ANALYSIS_REANALYZE) { 167 } else if (requestName == ANALYSIS_REANALYZE) {
168 return reanalyze(request); 168 return reanalyze(request);
169 } else if (requestName == ANALYSIS_SET_ANALYSIS_ROOTS) { 169 } else if (requestName == ANALYSIS_SET_ANALYSIS_ROOTS) {
170 return setAnalysisRoots(request); 170 return setAnalysisRoots(request);
171 } else if (requestName == ANALYSIS_SET_GENERAL_SUBSCRIPTIONS) {
172 return setGeneralSubscriptions(request);
171 } else if (requestName == ANALYSIS_SET_PRIORITY_FILES) { 173 } else if (requestName == ANALYSIS_SET_PRIORITY_FILES) {
172 return setPriorityFiles(request); 174 return setPriorityFiles(request);
173 } else if (requestName == ANALYSIS_SET_SUBSCRIPTIONS) { 175 } else if (requestName == ANALYSIS_SET_SUBSCRIPTIONS) {
174 return setSubscriptions(request); 176 return setSubscriptions(request);
175 } else if (requestName == ANALYSIS_UPDATE_CONTENT) { 177 } else if (requestName == ANALYSIS_UPDATE_CONTENT) {
176 return updateContent(request); 178 return updateContent(request);
177 } else if (requestName == ANALYSIS_UPDATE_OPTIONS) { 179 } else if (requestName == ANALYSIS_UPDATE_OPTIONS) {
178 return updateOptions(request); 180 return updateOptions(request);
179 } 181 }
180 } on RequestFailure catch (exception) { 182 } on RequestFailure catch (exception) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 */ 214 */
213 Response setAnalysisRoots(Request request) { 215 Response setAnalysisRoots(Request request) {
214 var params = new AnalysisSetAnalysisRootsParams.fromRequest(request); 216 var params = new AnalysisSetAnalysisRootsParams.fromRequest(request);
215 // continue in server 217 // continue in server
216 server.setAnalysisRoots(request.id, params.included, params.excluded, 218 server.setAnalysisRoots(request.id, params.included, params.excluded,
217 params.packageRoots == null ? {} : params.packageRoots); 219 params.packageRoots == null ? {} : params.packageRoots);
218 return new AnalysisSetAnalysisRootsResult().toResponse(request.id); 220 return new AnalysisSetAnalysisRootsResult().toResponse(request.id);
219 } 221 }
220 222
221 /** 223 /**
224 * Implement the 'analysis.setGeneralSubscriptions' request.
225 */
226 Response setGeneralSubscriptions(Request request) {
227 AnalysisSetGeneralSubscriptionsParams params =
228 new AnalysisSetGeneralSubscriptionsParams.fromRequest(request);
229 server.setGeneralAnalysisSubscriptions(params.subscriptions);
230 return new AnalysisSetGeneralSubscriptionsResult().toResponse(request.id);
231 }
232
233 /**
222 * Implement the 'analysis.setPriorityFiles' request. 234 * Implement the 'analysis.setPriorityFiles' request.
223 */ 235 */
224 Response setPriorityFiles(Request request) { 236 Response setPriorityFiles(Request request) {
225 var params = new AnalysisSetPriorityFilesParams.fromRequest(request); 237 var params = new AnalysisSetPriorityFilesParams.fromRequest(request);
226 server.setPriorityFiles(request.id, params.files); 238 server.setPriorityFiles(request.id, params.files);
227 return new AnalysisSetPriorityFilesResult().toResponse(request.id); 239 return new AnalysisSetPriorityFilesResult().toResponse(request.id);
228 } 240 }
229 241
230 /** 242 /**
231 * Implement the 'analysis.setSubscriptions' request. 243 * Implement the 'analysis.setSubscriptions' request.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 285 }
274 if (newOptions.generateLints != null) { 286 if (newOptions.generateLints != null) {
275 updaters.add((engine.AnalysisOptionsImpl options) { 287 updaters.add((engine.AnalysisOptionsImpl options) {
276 options.lint = newOptions.generateLints; 288 options.lint = newOptions.generateLints;
277 }); 289 });
278 } 290 }
279 server.updateOptions(updaters); 291 server.updateOptions(updaters);
280 return new AnalysisUpdateOptionsResult().toResponse(request.id); 292 return new AnalysisUpdateOptionsResult().toResponse(request.id);
281 } 293 }
282 } 294 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698