| 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 9cc2f41ec2be66d45c3b4268d5a019897c5f7a50..aad7ca3b0eab69d3a36893541ac285230c818735 100644
|
| --- a/pkg/analysis_server/lib/src/computer/computer_hover.dart
|
| +++ b/pkg/analysis_server/lib/src/computer/computer_hover.dart
|
| @@ -95,7 +95,13 @@ class DartUnitHoverComputer {
|
| // description
|
| hover.elementDescription = element.toString();
|
| hover.elementKind = element.kind.displayName;
|
| - // library
|
| + // containing class
|
| + ClassElement containingClass =
|
| + element.getAncestor((e) => e is ClassElement);
|
| + if (containingClass != null) {
|
| + hover.containingClassDescription = containingClass.toString();
|
| + }
|
| + // containing library
|
| LibraryElement library = element.library;
|
| if (library != null) {
|
| hover.containingLibraryName = library.name;
|
|
|