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

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

Issue 300023004: Partial implementation of the 'setAnalysisRoots' API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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.context; 5 library domain.context;
6 6
7 import 'package:analysis_server/src/analysis_server.dart'; 7 import 'package:analysis_server/src/analysis_server.dart';
8 import 'package:analysis_server/src/protocol.dart'; 8 import 'package:analysis_server/src/protocol.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/source.dart'; 10 import 'package:analyzer/src/generated/source.dart';
11 11
12 /** 12 /**
13 * Instances of the class [ContextDomainHandler] implement a [RequestHandler] 13 * Instances of the class [ContextDomainHandler] implement a [RequestHandler]
14 * that handles requests in the context domain. 14 * that handles requests in the context domain.
15 *
16 * TODO(scheglov) this class is replaces with [AnalysisDomainHandler].
15 */ 17 */
16 class ContextDomainHandler implements RequestHandler { 18 class ContextDomainHandler implements RequestHandler {
17 /** 19 /**
18 * The name of the context.applyChanges request. 20 * The name of the context.applyChanges request.
19 */ 21 */
20 static const String APPLY_CHANGES_NAME = 'context.applyChanges'; 22 static const String APPLY_CHANGES_NAME = 'context.applyChanges';
21 23
22 /** 24 /**
23 * The name of the context.getFixes request. 25 * The name of the context.getFixes request.
24 */ 26 */
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 */ 266 */
265 AnalysisContext getAnalysisContext(Request request) { 267 AnalysisContext getAnalysisContext(Request request) {
266 String contextId = request.getRequiredParameter(CONTEXT_ID_PARAM).asString() ; 268 String contextId = request.getRequiredParameter(CONTEXT_ID_PARAM).asString() ;
267 AnalysisContext context = server.contextMap[contextId]; 269 AnalysisContext context = server.contextMap[contextId];
268 if (context == null) { 270 if (context == null) {
269 throw new RequestFailure(new Response.contextDoesNotExist(request)); 271 throw new RequestFailure(new Response.contextDoesNotExist(request));
270 } 272 }
271 return context; 273 return context;
272 } 274 }
273 } 275 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698