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

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

Issue 389413002: Use HasToJson when set Reponse/Notification parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | 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/constants.dart'; 10 import 'package:analysis_server/src/constants.dart';
(...skipping 19 matching lines...) Expand all
30 AnalysisDomainHandler(this.server); 30 AnalysisDomainHandler(this.server);
31 31
32 /** 32 /**
33 * Implement the `analysis.getHover` request. 33 * Implement the `analysis.getHover` request.
34 */ 34 */
35 Response getAnalysisHover(Request request) { 35 Response getAnalysisHover(Request request) {
36 // prepare parameters 36 // prepare parameters
37 String file = request.getRequiredParameter(FILE).asString(); 37 String file = request.getRequiredParameter(FILE).asString();
38 int offset = request.getRequiredParameter(OFFSET).asInt(); 38 int offset = request.getRequiredParameter(OFFSET).asInt();
39 // prepare hovers 39 // prepare hovers
40 List<Map<String, Object>> hovers = <Map<String, Object>>[]; 40 List<Hover> hovers = <Hover>[];
41 { 41 {
42 Source source = server.getSource(file); 42 Source source = server.getSource(file);
43 AnalysisContext context = server.getAnalysisContext(file); 43 AnalysisContext context = server.getAnalysisContext(file);
44 List<Source> librarySources = context.getLibrariesContaining(source); 44 List<Source> librarySources = context.getLibrariesContaining(source);
45 for (Source librarySource in librarySources) { 45 for (Source librarySource in librarySources) {
46 CompilationUnit unit = context.resolveCompilationUnit2(source, 46 CompilationUnit unit = context.resolveCompilationUnit2(source,
47 librarySource); 47 librarySource);
48 hovers.add(new DartUnitHoverComputer(unit, offset).compute()); 48 hovers.add(new DartUnitHoverComputer(unit, offset).compute());
49 } 49 }
50 } 50 }
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 /** 226 /**
227 * A description of the change to the content of a file. 227 * A description of the change to the content of a file.
228 */ 228 */
229 class ContentChange { 229 class ContentChange {
230 String content; 230 String content;
231 int offset; 231 int offset;
232 int oldLength; 232 int oldLength;
233 int newLength; 233 int newLength;
234 } 234 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/computer/computer_overrides.dart ('k') | pkg/analysis_server/lib/src/protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698