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

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

Issue 1218183007: Change navigation regions generation for constructors. (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
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis/notification_navigation_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/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 504bf407323b1315f48b1073cef074be82fb5989..14a47ec8194f8c7a639cdbd46ca7de2d02ad2e3b 100644
--- a/pkg/analysis_server/lib/src/computer/computer_navigation.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_navigation.dart
@@ -246,17 +246,15 @@ class _DartUnitNavigationComputerVisitor extends RecursiveAstVisitor {
}
// add regions
TypeName typeName = node.type;
+ computer._addRegionForNode(typeName.name, element);
+ // <TypeA, TypeB>
TypeArgumentList typeArguments = typeName.typeArguments;
- if (typeArguments == null) {
- computer._addRegion_nodeStart_nodeEnd(parent, node, element);
- } else {
- computer._addRegion_nodeStart_nodeEnd(parent, typeName.name, element);
- // <TypeA, TypeB>
+ if (typeArguments != null) {
typeArguments.accept(this);
- // optional ".name"
- if (node.period != null) {
- computer._addRegion_tokenStart_nodeEnd(node.period, node, element);
- }
+ }
+ // optional "name"
+ if (node.name != null) {
+ computer._addRegionForNode(node.name, element);
}
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis/notification_navigation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698