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

Unified Diff: pkg/analysis_server/lib/src/services/index/store/codec.dart

Issue 877693004: Fix for file:// package: references to the same element. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/services/index/store/codec_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/services/index/store/codec.dart
diff --git a/pkg/analysis_server/lib/src/services/index/store/codec.dart b/pkg/analysis_server/lib/src/services/index/store/codec.dart
index de900568c23297c7f22a847351d3d91f8b7d3e91..1625edd88fcf35715c3632d6a24e6bd205957379 100644
--- a/pkg/analysis_server/lib/src/services/index/store/codec.dart
+++ b/pkg/analysis_server/lib/src/services/index/store/codec.dart
@@ -182,8 +182,11 @@ class ElementCodec {
if (library != null) {
components = components.toList();
components[0] = library.source.fullName;
- if (element.enclosingElement is CompilationUnitElement) {
- components[1] = library.definingCompilationUnit.source.fullName;
+ for (Element e = element; e != null; e = e.enclosingElement) {
Brian Wilkerson 2015/01/26 19:07:15 Or perhaps: CompilationUnitElement unit = eleme
+ if (e is CompilationUnitElement) {
+ components[1] = e.source.fullName;
+ break;
+ }
}
}
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/index/store/codec_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698