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

Unified Diff: pkg/analysis_server/lib/src/computer/computer_navigation.dart

Issue 1232683003: Issue 23640. Implement 'analysis.getNavigation' request. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
Index: pkg/analysis_server/lib/src/computer/computer_navigation.dart
diff --git a/pkg/analysis_server/lib/src/computer/computer_navigation.dart b/pkg/analysis_server/lib/src/computer/computer_navigation.dart
index 14a47ec8194f8c7a639cdbd46ca7de2d02ad2e3b..12973796c51d5f0ed94faf0368dbdd67db0526af 100644
--- a/pkg/analysis_server/lib/src/computer/computer_navigation.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_navigation.dart
@@ -16,21 +16,17 @@ import 'package:analyzer/src/generated/source.dart';
* A computer for navigation regions in a Dart [CompilationUnit].
*/
class DartUnitNavigationComputer {
- final CompilationUnit _unit;
-
final List<String> files = <String>[];
final Map<String, int> fileMap = new HashMap<String, int>();
final List<protocol.NavigationTarget> targets = <protocol.NavigationTarget>[];
final Map<Element, int> targetMap = new HashMap<Element, int>();
final List<protocol.NavigationRegion> regions = <protocol.NavigationRegion>[];
- DartUnitNavigationComputer(this._unit);
-
/**
* Computes [regions], [targets] and [files].
*/
- void compute() {
- _unit.accept(new _DartUnitNavigationComputerVisitor(this));
+ void compute(AstNode node) {
+ node.accept(new _DartUnitNavigationComputerVisitor(this));
}
int _addFile(String file) {

Powered by Google App Engine
This is Rietveld 408576698