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

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

Issue 422573003: Implementation of the 'search.getTypeHierarchy' API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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.analysis; 5 library domain.analysis;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/src/analysis_server.dart'; 9 import 'package:analysis_server/src/analysis_server.dart';
10 import 'package:analysis_server/src/computer/computer_hover.dart'; 10 import 'package:analysis_server/src/computer/computer_hover.dart';
11 import 'package:analysis_server/src/computer/error.dart'; 11 import 'package:analysis_server/src/computer/error.dart';
12 import 'package:analysis_server/src/constants.dart'; 12 import 'package:analysis_server/src/constants.dart';
13 import 'package:analysis_server/src/protocol.dart'; 13 import 'package:analysis_server/src/protocol.dart';
14 import 'package:analysis_services/constants.dart'; 14 import 'package:analysis_services/constants.dart';
15 import 'package:analysis_services/search/search_engine.dart';
15 import 'package:analyzer/src/generated/ast.dart'; 16 import 'package:analyzer/src/generated/ast.dart';
16 import 'package:analyzer/src/generated/engine.dart'; 17 import 'package:analyzer/src/generated/engine.dart';
17 18
18 19
19 /** 20 /**
20 * Instances of the class [AnalysisDomainHandler] implement a [RequestHandler] 21 * Instances of the class [AnalysisDomainHandler] implement a [RequestHandler]
21 * that handles requests in the `analysis` domain. 22 * that handles requests in the `analysis` domain.
22 */ 23 */
23 class AnalysisDomainHandler implements RequestHandler { 24 class AnalysisDomainHandler implements RequestHandler {
24 /** 25 /**
25 * The analysis server that is using this handler to process requests. 26 * The analysis server that is using this handler to process requests.
26 */ 27 */
27 final AnalysisServer server; 28 final AnalysisServer server;
28 29
29 /** 30 /**
31 * The [SearchEngine] for this server.
32 */
33 SearchEngine searchEngine;
34
35 /**
30 * Initialize a newly created handler to handle requests for the given [server ]. 36 * Initialize a newly created handler to handle requests for the given [server ].
31 */ 37 */
32 AnalysisDomainHandler(this.server); 38 AnalysisDomainHandler(this.server) {
39 searchEngine = server.searchEngine;
40 }
33 41
34 /** 42 /**
35 * Implement the `analysis.getErrors` request. 43 * Implement the `analysis.getErrors` request.
36 */ 44 */
37 Response getErrors(Request request) { 45 Response getErrors(Request request) {
38 String file = request.getRequiredParameter(FILE).asString(); 46 String file = request.getRequiredParameter(FILE).asString();
39 server.onFileAnalysisComplete(file).then((_) { 47 server.onFileAnalysisComplete(file).then((_) {
40 Response response = new Response(request.id); 48 Response response = new Response(request.id);
41 AnalysisErrorInfo errorInfo = server.getErrors(file); 49 AnalysisErrorInfo errorInfo = server.getErrors(file);
42 if (errorInfo == null) { 50 if (errorInfo == null) {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 264
257 /** 265 /**
258 * A description of the change to the content of a file. 266 * A description of the change to the content of a file.
259 */ 267 */
260 class ContentChange { 268 class ContentChange {
261 String content; 269 String content;
262 int offset; 270 int offset;
263 int oldLength; 271 int oldLength;
264 int newLength; 272 int newLength;
265 } 273 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698