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

Unified Diff: pkg/analysis_server/lib/src/domains/analysis/navigation.dart

Issue 1323243008: Sort navigation regions after gathering results from all of the contributors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/domains/analysis/navigation.dart
diff --git a/pkg/analysis_server/lib/src/domains/analysis/navigation.dart b/pkg/analysis_server/lib/src/domains/analysis/navigation.dart
index 8cb08ae4e21b602108e25839c8cb0dd327497bc8..859cd7cf92d21a8fc614a81789d9a443ef1c60e2 100644
--- a/pkg/analysis_server/lib/src/domains/analysis/navigation.dart
+++ b/pkg/analysis_server/lib/src/domains/analysis/navigation.dart
@@ -32,6 +32,7 @@ NavigationHolderImpl computeNavigation(AnalysisServer server,
new CaughtException(exception, stackTrace));
}
}
+ holder.sortRegions();
return holder;
}
@@ -66,6 +67,12 @@ class NavigationHolderImpl implements NavigationHolder {
regions.add(region);
}
+ void sortRegions() {
+ regions.sort((a, b) {
+ return a.offset - b.offset;
+ });
+ }
+
int _addFile(String file) {
int index = fileMap[file];
if (index == null) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698