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

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

Issue 874373003: Library dependencies server API updates (to pass package maps). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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 | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/generated_protocol.dart » ('j') | 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.analysis; 5 library domain.analysis;
6 6
7 import 'dart:async'; 7 import 'dart:async';
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';
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (hoverInformation != null) { 83 if (hoverInformation != null) {
84 hovers.add(hoverInformation); 84 hovers.add(hoverInformation);
85 } 85 }
86 } 86 }
87 // send response 87 // send response
88 return new AnalysisGetHoverResult(hovers).toResponse(request.id); 88 return new AnalysisGetHoverResult(hovers).toResponse(request.id);
89 } 89 }
90 90
91 /// Implement the `analysis.getLibraryDependencies` request. 91 /// Implement the `analysis.getLibraryDependencies` request.
92 Response getLibraryDependencies(Request request) { 92 Response getLibraryDependencies(Request request) {
93 Set<String> libraries = new LibraryDependencyCollector( 93 LibraryDependencyCollector collector = new LibraryDependencyCollector(
94 server.getAnalysisContexts()).collectLibraryDependencies(); 94 server.getAnalysisContexts());
95 Set<String> libraries = collector.collectLibraryDependencies();
96 Map<String, Map<String, List<String>>> packageMap = collector.calculatePacka geMap(server.folderMap);
95 return new AnalysisGetLibraryDependenciesResult( 97 return new AnalysisGetLibraryDependenciesResult(
96 libraries.toList(growable: false)).toResponse(request.id); 98 libraries.toList(growable: false), packageMap).toResponse(request.id);
97 } 99 }
98 100
99 @override 101 @override
100 Response handleRequest(Request request) { 102 Response handleRequest(Request request) {
101 try { 103 try {
102 String requestName = request.method; 104 String requestName = request.method;
103 if (requestName == ANALYSIS_GET_ERRORS) { 105 if (requestName == ANALYSIS_GET_ERRORS) {
104 return getErrors(request); 106 return getErrors(request);
105 } else if (requestName == ANALYSIS_GET_HOVER) { 107 } else if (requestName == ANALYSIS_GET_HOVER) {
106 return getHover(request); 108 return getHover(request);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 195 }
194 if (newOptions.generateHints != null) { 196 if (newOptions.generateHints != null) {
195 updaters.add((engine.AnalysisOptionsImpl options) { 197 updaters.add((engine.AnalysisOptionsImpl options) {
196 options.hint = newOptions.generateHints; 198 options.hint = newOptions.generateHints;
197 }); 199 });
198 } 200 }
199 server.updateOptions(updaters); 201 server.updateOptions(updaters);
200 return new AnalysisUpdateOptionsResult().toResponse(request.id); 202 return new AnalysisUpdateOptionsResult().toResponse(request.id);
201 } 203 }
202 } 204 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/generated_protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698