| Index: pkg/analysis_server/lib/src/protocol_server.dart
|
| diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
|
| index 7a9b2b320ec9f3f71c069130a9a8fa414e701542..c97e96cd954f8e35c5bff902e033159da1f2553e 100644
|
| --- a/pkg/analysis_server/lib/src/protocol_server.dart
|
| +++ b/pkg/analysis_server/lib/src/protocol_server.dart
|
| @@ -341,7 +341,14 @@ List<Element> _computePath(engine.Element element) {
|
| List<Element> path = <Element>[];
|
| while (element != null) {
|
| path.add(newElement_fromEngine(element));
|
| - element = element.enclosingElement;
|
| + // go up
|
| + if (element is engine.PrefixElement) {
|
| + // imports are library children, but they are physically in the unit
|
| + engine.LibraryElement library = element.enclosingElement;
|
| + element = library.definingCompilationUnit;
|
| + } else {
|
| + element = element.enclosingElement;
|
| + }
|
| }
|
| return path;
|
| }
|
|
|