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

Side by Side Diff: pkg/analysis_server/lib/src/computer/computer_navigation.dart

Issue 1246833002: Tweak for navigation for URIs. (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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library computer.navigation; 5 library computer.navigation;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/src/protocol_server.dart' as protocol; 9 import 'package:analysis_server/src/protocol_server.dart' as protocol;
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/src/generated/ast.dart';
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 } 255 }
256 256
257 /** 257 /**
258 * If the source of the given [element] (referenced by the [node]) exists, 258 * If the source of the given [element] (referenced by the [node]) exists,
259 * then add the navigation region from the [node] to the [element]. 259 * then add the navigation region from the [node] to the [element].
260 */ 260 */
261 void _addUriDirectiveRegion(UriBasedDirective node, Element element) { 261 void _addUriDirectiveRegion(UriBasedDirective node, Element element) {
262 if (element != null) { 262 if (element != null) {
263 Source source = element.source; 263 Source source = element.source;
264 if (element.context.exists(source)) { 264 if (element.context.exists(source)) {
265 computer._addRegion_tokenStart_nodeEnd(node.keyword, node.uri, element); 265 computer._addRegionForNode(node.uri, element);
266 } 266 }
267 } 267 }
268 } 268 }
269 269
270 void _safelyVisit(AstNode node) { 270 void _safelyVisit(AstNode node) {
271 if (node != null) { 271 if (node != null) {
272 node.accept(this); 272 node.accept(this);
273 } 273 }
274 } 274 }
275 } 275 }
OLDNEW
« 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