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

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

Issue 305643003: Fix analyzer warning. (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
« no previous file with comments | « no previous file | 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 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';
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 }); 258 });
259 return sources; 259 return sources;
260 } 260 }
261 261
262 /** 262 /**
263 * Return the analysis context specified by the given request, or throw a 263 * Return the analysis context specified by the given request, or throw a
264 * [RequestFailure] exception if either there is no specified context or if 264 * [RequestFailure] exception if either there is no specified context or if
265 * the specified context does not exist. 265 * the specified context does not exist.
266 */ 266 */
267 AnalysisContext getAnalysisContext(Request request) { 267 AnalysisContext getAnalysisContext(Request request) {
268 String contextId = request.getRequiredParameter(CONTEXT_ID_PARAM).asString() ; 268 // TODO(scheglov) remove it after migrating to the new API
269 AnalysisContext context = server.contextMap[contextId]; 269 return null;
270 if (context == null) { 270 // String contextId = request.getRequiredParameter(CONTEXT_ID_PARAM).asString ();
271 throw new RequestFailure(new Response.contextDoesNotExist(request)); 271 // AnalysisContext context = server.contextMap[contextId];
272 } 272 // if (context == null) {
273 return context; 273 // throw new RequestFailure(new Response.contextDoesNotExist(request));
274 // }
275 // return context;
274 } 276 }
275 } 277 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698