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

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

Issue 1417483006: Support for searching files by import/export/part URIs and library identifiers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
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 analysis.server; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:core' hide Resource; 9 import 'dart:core' hide Resource;
10 import 'dart:math' show max; 10 import 'dart:math' show max;
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 */ 566 */
567 List<Element> getElementsOfNodes(List<AstNode> nodes) { 567 List<Element> getElementsOfNodes(List<AstNode> nodes) {
568 List<Element> elements = <Element>[]; 568 List<Element> elements = <Element>[];
569 for (AstNode node in nodes) { 569 for (AstNode node in nodes) {
570 if (node is SimpleIdentifier && node.parent is LibraryIdentifier) { 570 if (node is SimpleIdentifier && node.parent is LibraryIdentifier) {
571 node = node.parent; 571 node = node.parent;
572 } 572 }
573 if (node is LibraryIdentifier) { 573 if (node is LibraryIdentifier) {
574 node = node.parent; 574 node = node.parent;
575 } 575 }
576 // TODO(scheglov) It seems now that resolving URI to the imported library
577 // is a mistake. Remove this from ElementLocator.
Brian Wilkerson 2015/10/20 14:57:15 Why is it a mistake?
578 if (node is StringLiteral) {
579 continue;
580 }
576 Element element = ElementLocator.locate(node); 581 Element element = ElementLocator.locate(node);
577 if (node is SimpleIdentifier && element is PrefixElement) { 582 if (node is SimpleIdentifier && element is PrefixElement) {
578 element = getImportElement(node); 583 element = getImportElement(node);
579 } 584 }
580 if (element != null) { 585 if (element != null) {
581 elements.add(element); 586 elements.add(element);
582 } 587 }
583 } 588 }
584 return elements; 589 return elements;
585 } 590 }
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 /** 1607 /**
1603 * The [PerformanceTag] for time spent in server request handlers. 1608 * The [PerformanceTag] for time spent in server request handlers.
1604 */ 1609 */
1605 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); 1610 static PerformanceTag serverRequests = new PerformanceTag('serverRequests');
1606 1611
1607 /** 1612 /**
1608 * The [PerformanceTag] for time spent in split store microtasks. 1613 * The [PerformanceTag] for time spent in split store microtasks.
1609 */ 1614 */
1610 static PerformanceTag splitStore = new PerformanceTag('splitStore'); 1615 static PerformanceTag splitStore = new PerformanceTag('splitStore');
1611 } 1616 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698