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

Unified Diff: pkg/analysis_server/lib/src/computer/computer_hover.dart

Issue 1513943005: Tweaks for hover. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/get_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/computer/computer_hover.dart
diff --git a/pkg/analysis_server/lib/src/computer/computer_hover.dart b/pkg/analysis_server/lib/src/computer/computer_hover.dart
index a6f7337a60d551e028c0fdf90dd56c693b22de21..0ae2459130bd712b90b0c42497aa96d2ff2d7d9c 100644
--- a/pkg/analysis_server/lib/src/computer/computer_hover.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_hover.dart
@@ -102,7 +102,7 @@ class DartUnitHoverComputer {
ClassElement containingClass =
element.getAncestor((e) => e is ClassElement);
if (containingClass != null) {
- hover.containingClassDescription = containingClass.toString();
+ hover.containingClassDescription = containingClass.displayName;
}
// containing library
LibraryElement library = element.library;
@@ -117,7 +117,9 @@ class DartUnitHoverComputer {
// parameter
hover.parameter = _safeToString(expression.bestParameterElement);
// types
- hover.staticType = _safeToString(expression.staticType);
+ if (element == null || element is VariableElement) {
+ hover.staticType = _safeToString(expression.staticType);
+ }
hover.propagatedType = _safeToString(expression.propagatedType);
// done
return hover;
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis/get_hover_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698