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

Unified Diff: pkg/analysis_server/lib/src/protocol_server.dart

Issue 766323002: Compressed/optimized navigation notification. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updates for review comments. Created 6 years 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
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 b783e84c903fb39f5c64875930cd68de35186023..26caf44a99f7368d6778230746f27831abcad2a1 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -226,6 +226,22 @@ Location newLocation_fromUnit(engine.CompilationUnit unit,
}
+NavigationTarget newNavigationTarget_fromElement(engine.Element element,
+ int fileToIndex(String file)) {
+ ElementKind kind = newElementKind_fromEngine(element.kind);
+ Location location = newLocation_fromElement(element);
+ String file = location.file;
+ int fileIndex = fileToIndex(file);
+ return new NavigationTarget(
+ kind,
+ fileIndex,
+ location.offset,
+ location.length,
+ location.startLine,
+ location.startColumn);
+}
+
+
/**
* Construct based on an element from the analyzer engine.
*/

Powered by Google App Engine
This is Rietveld 408576698