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

Unified Diff: pkg/analysis_server/lib/src/domain_analysis.dart

Issue 407443002: Fix analysis server 'analysis.getHover' when there is no hover information. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis_hover_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/domain_analysis.dart
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index 8277f3cdf7befde94648697819369bd4441a2004..d26aead5a43b8a2ff9508f0839af1b6f918ca096 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -39,7 +39,10 @@ class AnalysisDomainHandler implements RequestHandler {
List<Hover> hovers = <Hover>[];
List<CompilationUnit> units = server.getResolvedCompilationUnits(file);
for (CompilationUnit unit in units) {
- hovers.add(new DartUnitHoverComputer(unit, offset).compute());
+ Hover hoverInformation = new DartUnitHoverComputer(unit, offset).compute();
+ if (hoverInformation != null) {
+ hovers.add(hoverInformation);
+ }
}
// send response
Response response = new Response(request.id);
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis_hover_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698