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; |